A simple to use React Native boilerplate that we use as our base at Grait Interaction for our production line of React Native applications. It's a full featured boilerplate with redux, redux-persist and reactnavigation integrated, working out-of-the-box.
This boilerplate includes the following external packages preconfigured with the application.
- Redux
- Redux Persist
- React Navigation
- Immutable
- Axios
- Redux Promise Middleware
- Clone or download this repo.
- Put content inside your own repo. Make sure you copy hidden files as well
- Remove ios/ and android/ folders
- Open package.json and name field from GRNB to your project name
- open index.js and change app name GRNB to same name as in 4.
- run
yarn install
ornpm install
depending on your choice. - run
react-native upgrade
to reinstall ios/ and android/ folders with the new project name
There are three prepared short commands to run your application
yarn run ios
will start ios simulator Iphone 8, yarn run iosx
will run ios simulator Iphone X and yarn run android
will start android.
This is where all React Native Javascript code goes. Inside this folder you'll find the following structure.
Structure | Usage description |
---|---|
actions/ | Place for redux actions |
components/ | Place for components |
config/ | Place for config files |
config/api.js | Api configuration file, set default urls etc here |
config/router.js | Router configuration file |
config/store.js | Redux store configuration file |
modules/ | Place for modules |
reducers/ | Place for Redux reducers |
screens/ | In this folder you place all your different screens that the app consists of. The screens you define in router.js |
utils/ | Utilities and tools |
AppWithNavigation.js | Only change if you need |
index.js/ | Only change if you need |
External resources, We've put theme template files here
- Material tabbar
- Moment
- Interactable
- React Native Camera
- React Native Icons
- Image Picker
- Calendars
- Background Geolocation
- Animatable
- Keep Awake
- Network Info
- Device Info
- Sensors
- Flex Grid
- Normalizr
tbc