ReactNativeStarterKit

1.0.0 • Public • Published

react-native-starter-kit

React Native starter kit - offline-first architecture proposal for iOS/Android application. Functionality are grouped by modules and can be easily scaled

Example application contains three different pages, navigation between them + loader and async tasks simulation


Using:

  • redux - Flux implementation
  • redux-thunk - middleware for async stuff
  • react-native-router-flux - simple, scalable, configurable router for React Native
  • redux-persist - stores redux state in ReactNative AsyncStorage
  • Implements offline-first approach - store redux state in ReactNative AsyncStorage
  • After Reload if user was authentificated - opens directly HomePage, otherwise LoginPage

Unit and components tests:

  • mocha, sinon, chai for unit tests You can find tests example in app/auth folder for auth.reducer

  • enzyme and react-native-mock for components testing See example in app/common/components for Button

Note: Javascript files are precompiled with Babel (see test/utils/compile.js)

Integration testing:

  • using appium for integrational testing See Appium setup in test/appium folder Please set correct version of your iOS simulator (9.3/10.0) in testConfig.js IOS_VERSION const Tests are in test/specs folder

Appium setup includes actionServer that serves commands from test (like actions and redirects). And TestRunner component that is Execute button, when pressing on it app gets commands from server and executes it. The main idea of it - to be able to login/logout/redirect between routes to make tests simpler .

Eslint:

  • using mocha-eslint

Continuous integration:

Package Sidebar

Install

npm i ReactNativeStarterKit

Weekly Downloads

3

Version

1.0.0

License

MIT

Last publish

Collaborators

  • philipshurpik