odesey / rnn-boilerplate

Boilerplate for React Native and React Native Navigation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This repo is a react-native boilerplate project integrated with react-native-navigation. It's a minimal setup to get you started with the latest react native and react native navigation. I have added Mobx into this project, but it should be straightforward enough to replace to Redux or any other packages.

The reason of bare minimal setup is that with the introduction of RN's autolinking, it has become easier than ever to integrate other native modules within the React Native app. So I don't see a necessity of the this boilerplate repo integrate other native modules.

Current Dependencies

react: "16.13.1"
react-native: "0.62.2"
react-native-navigation: "6.6.1"
mobx: "5.15.4"
mobx-react-lite: "2.0.7"
mobx-persist: "0.4.1"
react-native-v8: "0.62.0-patch.0"
v8-android-nointl: "8.80.0"

typescript: "3.9.2"

Others

  • This project utilise ram bundles and inline require turned on.
  • This project uses react-native-v8 engine in favour of Hermes or default Android JSC.

Project Structure

The structure of the project is as follows:

// The first point of the app intialization.
app/index.ts

// The folder for all routes related files.
routes/
  // RNN Navigation configurations.
  config/

  // RNN registered screens. If you don't need to segment your screens with some
  // sort of Auth logic (typically checking the existence of Auth Token in private screens),
  // you can have different structure.
  private/
  public/

  // A collection of helper functions for navigation.
  function.ts

  // A collection of HOC component that wraps registering screens.
	Provider.tsx

	// Importing and registering all screens to RNN.
  routes.ts
  screens.ts
  types.ts

// Following Mobx RootStore pattern.
store/

About

Boilerplate for React Native and React Native Navigation


Languages

Language:TypeScript 38.1%Language:Java 18.6%Language:Ruby 17.3%Language:Objective-C 11.3%Language:JavaScript 9.1%Language:Starlark 4.9%Language:Swift 0.5%Language:C 0.3%