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.
$ npm start
Run command to open iOS simulator and run app:
$ npm run ios
Or open ios/RNBoilerplate.xcodeproj
file with XCode:
$ npm run ios-open
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.
We used react-native-mock, and test with Mocha, Enzyme.
$ npm test