The React Native, Redux boilerplate for personal usage
Included
- React & React Native v0.25
- Redux & Remote Redux DevTools & On Debugger
- Immutable & Immutable DevTools
- Babel & Plugins: transform-decorators-legacy
Installation
See Getting Started to install requirement tools.
$ npm install -g react-native-cli
$ npm install
Also, you can use generator-rnb to create project with this boilerplate.
Development
Start local server
$ npm start
iOS
Run command to open iOS simulator and run app:
$ npm run ios
Or open ios/RNBoilerplate.xcodeproj
file with XCode:
$ npm run ios-open
Android (5.0+)
Open Android emulator (recommented Genymotion) and run command: (Or connect real device via USB)
$ adb reverse tcp:8081 tcp:8081 # react-native local server
$ adb reverse tcp:5678 tcp:5678 # remotedev local server
$ npm run android
[Emulator only] If you're still use Android 4.0, it will cannot use adb reverse
, you should use 10.0.2.2
(Genymotion: 10.0.3.2
) instead of localhost
in configureStore.js.
Test
We used react-native-mock, and test with Mocha, Enzyme.
$ npm test
Credits
- react-native-counter-ios-android's counter example.