- Follow guide on how to setup Android/IOS https://facebook.github.io/react-native/docs/getting-started.html
$ npm install
- Create release keystore - https://facebook.github.io/react-native/docs/signed-apk-android.html (Name it rn-boilerplate-release-key.keystore)
- Put the release key in
android/app
folder - Setup these gradle properties in
~/.gradle/gradle.properties
: (values based on the keystore you created on step 3) RN_BOILERPLATE_ONESIGNAL_APP_ID=xxxx RN_BOILERPLATE_RELEASE_STORE_FILE=rn-boilerplate-release-key.keystore RN_BOILERPLATE_RELEASE_KEY_ALIAS=rn-boilerplate-key-alias RN_BOILERPLATE_RELEASE_STORE_PASSWORD=password RN_BOILERPLATE_RELEASE_KEY_PASSWORD=password $ react-native run-android
- Login page
- Authentication flow
- Using AsyncStorage to store session
- Drawer (side menu)
- Routing
- API mock
- Splash screen
- Create new react native project
$ react-native init <project-name>
$ cd <project-name>
- Copy the whole src folders
$ cp -R <rn-boilerplate-dir>/src .
- Copy index.android.js and index.ios.js
$ cp <rn-boilerplate-dir>/index.android.js .
$ cp <rn-boilerplate-dir>/index.ios.js .
Note: Edit both file and rename the project name 4. Add required dependencies
$ npm install --save react-native-drawer
$ npm install --save react-native-router-flux
$ npm install --save react-native-snackbar
$ npm install --save redux
$ npm install --save react-redux
$ npm install --save redux-logger
$ npm install --save redux-thunk
$ npm install --save react-native-vector-icons
$ npm install --save react-native-onesignal
$ npm install --save react-native-animatable
- Link
$ react-native link
NOTE: you need to manually configure onesignal (check https://github.com/geektimecoil/react-native-onesignal)
6. Create release keystore and add the configuration on android/app/build.gradle
7. Run
$ react-native run-android
- module's actions/states/components are shareable
- scene MAY use module's actions/states/components
- module MAY use other module's actions/states/components
- scene's actions/states/components are not shareable
- scene should NEVER use other scene's actions/states/components
- module should NEVER use scene's actions/states/components
- container is where to connect actions/states
- component's job should only be for rendering
- try not to use internal state at all
- Top level loading spinner modal
- Migrate to react navigation