ReactNativeStarterKit

React Native Starter Kit with Redux - crossplatform for iOS and Android

Usage no npm install needed!

<script type="module">
  import ReactNativeStarterKit from 'https://cdn.skypack.dev/ReactNativeStarterKit';
</script>

README

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: