A React Native project starter with Typescript, a theme provider with hook to easy styling component, a folder architecture ready and some configs to keep a codebase clean.

Overview

React Native Boilerplate

Folder structure :

src
├── assets
│   ├── audios
│   ├── fonts
│   ├── icons
│   └── images
├── components
│   ├── Layout.tsx
│   ├── Text.tsx
│   └── folder-rules.txt
├── navigators
├── screens
│   ├── WelcomeScreen.tsx
│   └── folder-rules.txt
├── services
├── themes
│   ├── ThemeContext.tsx
│   └── themes.ts
├── translations
│   ├── en
│   │   ├── common.json
│   │   └── index.ts
│   ├── fr
│   │   ├── common.json
│   │   └── index.ts
│   ├── i18n.js
│   └── resources.ts
└── utilities
    ├── constants.ts
    └── helpers.ts

Packages

  • typescript
  • @typescript-eslint
  • eslint-react-hook
  • @react-native-community/eslint-config
  • prettier
  • husky (pre-commit)
  • i18next
  • react-native-dotenv
  • react testing library

Theming

Styling was handle with a Context provider and a custom hook (useTheme) to use it. The theme provider detect the color scheme of the device (light or dark) and use it by default or when it change, but you can also switch the theme manually.

You can use your the custom hook "useTheme" like this :

// Component.jsx

const Component = props => {
  const { theme, isDarkMode, setDarkMode } = useTheme();

  return (
    <View style={styles(theme).container}>
      <Switch
        onValueChange={switchState => setDarkMode(switchState)}
        value={isDarkMode}
      />
    </View>
  );
};

const styles = theme =>
  StyleSheet.create({
    container: {
      backgroundColor: theme.colors.mainBackground,
    },
  });

Conventions

You might also like...

Spring Boot Clean Architecture - Iran Plate

Spring Boot Clean Architecture - Iran Plate

Spring Boot Clean Architecture Sample Iran Plate Location Finder I used the Clean Architecture in my project. In this method we can develop our projec

Jul 6, 2022

A springboot-starter that can achieve Intranet penetration. 一款可以实现内网穿透的springboot-starter。

qynat-springboot-starter 基于netty的内网穿透工具在springboot中的整合 protocol协议:protobuf 只需在application.properties中配置少量信息,实现零代码侵入的web项目内网穿透 项目的server端的源码在另一个多模块项目中,

Dec 12, 2022

A springboot-starter that can achieve Intranet penetration. 一款可以实现内网穿透的springboot-starter。

qynat-springboot-starter 基于netty的内网穿透工具在springboot中的整合 protocol协议:protobuf 只需在application.properties中配置少量信息,实现零代码侵入的web项目内网穿透 项目的server端的源码在另一个多模块项目中,

Dec 12, 2022

Helps creating new architecture files for react native.

Work In Progress Create React Native New Arch Files This script helps creating newly added new architecture files for react native. How to run the scr

Oct 17, 2022

A simple plugin to load behavior packs from the 'behavior_packs' folder.

Behaviour Pack Loader for Nukkit A simple plugin to load behavior packs from the behavior_packs folder. If you found any bugs or have any suggestions,

Dec 7, 2022

This is a module for Waterfall/Bungeecord! That means instead of putting it in the plugins/ folder

This is a module for Waterfall/Bungeecord! That means instead of putting it in the plugins/ folder

CMD: Plugins This is a module for Waterfall/Bungeecord! That means instead of putting it in the plugins/ folder, you put it in the modules/ folder! In

Jun 8, 2022

PluginHooker is a Bukkit plugin that aims to provide an ultimately simple and better method to hook Bukkit events.

PluginHooker PluginHooker is a Bukkit plugin that aims to provide an ultimately simple and better method to hook Bukkit events. Localization 简体中文 Feat

Nov 23, 2022

A Mixin framework for Spigot/Bukkit that allows you to hook custom event anywhere

A Mixin framework for Spigot/Bukkit that allows you to hook custom event anywhere

A Mixin framework for Spigot/Bukkit that allows you to hook custom event anywhere. Start coding your advanced plugins today!

Nov 30, 2022

React native wrapper for Jitsi Meet SDK Library that rely on the native view (Activity / ViewController)

react-native-jitsi-meet-sdk React native wrapper for Jitsi Meet SDK Library. This Library implements the Jitsi SDK with a native activity on the Andro

May 2, 2022
Owner
LazyRabbit
Fullstack developer : @uptime.ac Easter egg lover
LazyRabbit
Clean-architecture-guide - Guia sobre Clean Architecture criado a partir dos meus estudos sobre o tema.

Clean Architecture Guide Arquitetura são as práticas e fundamentos de como organizamos um sistema. Tem relação e como os componentes estão relacionado

Jean Jacques Nascimento Barros 3 Apr 23, 2022
starter project for react native cli setups, typescript included

A starter project with react native 0.68, @storybook/react-native 6.0 beta, storybook/addon-react-native-web getting started To get all the dependenci

Danny 26 Dec 21, 2022
React 0.68+ Turbo Module starter using codegen with typescript for Objective-C and Java/Kotlin with C++ shared library. 🚀🚀🚀

React 0.68+ Turbo Module starter using codegen with typescript for Objective-C and Java/Kotlin with C++ shared library. ?? ?? ?? Features React Native

Nagish Inc. 358 Jan 3, 2023
An awesome native wheel picker component for React Native.

⛏️ react-native-picky An awesome native wheel picker component for react-native. Features Supports multiple columns ✅ Supports looping ✅ Native Androi

null 28 Dec 4, 2022
This project illustrates TDD & Clean Architecture implementation in Java

Banking Kata - Java Overview This project illustrates TDD & Clean Architecture implementation in Java, showing the Use Case Driven Development Approac

Valentina Cupać 191 Dec 28, 2022
Repositório destinado para projeto da semana Spring React do Dev superior. Utilizando Java, TypeScript e Frameworks

⚛️ DS Meta - Semana Spring-React Repositório destinado para projeto da semana Spring React do Dev superior. Utilizando Java, JavaScript e Frameworks.

João Vítor Queiroz 2 Sep 11, 2022
An example to show how you could use clean architecture and DDD elements with Camunda.

Camunda DDD and Clean Architecture An example to show how you could use clean architecture and DDD and their advantages with Camunda. I also wrote a b

Luc Weinbrecht 10 Dec 15, 2022
With react-native-update-in-app library you can easily implement in-app updates in your React Native app using CDN or any other file server

React Native In-App update With react-native-update-in-app library you can easily implement in-app updates in your React Native app using CDN or any o

Nepein Andrey 7 Dec 21, 2022
NPM Package - A react native component that let you to add a wavy background UI.

react-native-wavy-background A react native component that let you to add a wavy background UI. Installation npm install react-native-wavy-background

Shevon Soyza 10 Oct 19, 2022
参考 DDD/Clean Architecture 设计理念,整合 Spring Boot/Spring Security/Mybatis Plus/Vavr 的 Spring Realworld 应用案例

Demo · 更多项目 · 参考资料 ms-spring-ddd-examples Unified Domain-driven Layered Architecture for MicroService Apps,试图探索一套切实可行的应用架构规范,可以复制、可以理解、可以落地、可以控制复杂性的指导

王下邀月熊 19 Sep 23, 2022