/react-native-boilerplate

A boilerplate for React Native (react-native 0.61.5, react-navigation, redux, redux-persist)

Primary LanguageJavaScriptMIT LicenseMIT

🚀 React Native Boilerplate

React Native Redux React Navigation V3 Redux Persist

React Native Boilerplate is a starting point for React Native application. This project is configured with redux, redux thunk and redux persist. Latest version of react-navigation (v4.0.10).

Features

Prerequisites

Getting Started

  1. Clone this repo, git clone https://github.com/duongtungls/react-native-boilerplate.git `

  2. Go to project's root directory, cd <your project name>

  3. Remove .git folder, rm -rf .git

  4. Open package.json and change the name property with your project name

  5. Open app.json and replace 'RNApp' by your project name

  6. Run yarn install or npm install to install dependencies

  7. Run react-native eject to upgrade and add iOS & Android Folders.

  8. Run react-native link

  9. Latest versions of react-navigation uses gesture handler which is native module. For android you have to do some additional steps to configure them. Follow these instructions

React Navigation should work fine even without these but when u need gestures or drawer navigation you need this setup

  1. Start the packager with npm start
  2. Connect a mobile device to your development machine
  3. Run the test application:
  • On Android:
    • Run npm run-android or react-native run-android
  • On iOS:
    • Run npm run-ios or react-native run-ios OR
    • Open ios/YourReactProject.xcodeproj in Xcode
    • Hit Run after selecting the desired device
  1. Enjoy!!!

Debug

Use React Native Debugger to debug React and Redux with Redux devtool React Native Debugger

Contributing

PRs are welcome