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
redux- Flux implementationredux-thunk- middleware for async stuffreact-native-router-flux- simple, scalable, configurable router for React Nativeredux-persist- stores redux state in ReactNativeAsyncStorage- Implements offline-first approach - store redux state in ReactNative
AsyncStorage - After Reload if user was authentificated - opens directly HomePage, otherwise LoginPage
-
mocha,sinon,chaifor unit tests You can find tests example inapp/authfolder forauth.reducer -
enzymeandreact-native-mockfor components testing See example inapp/common/componentsforButton
Note:
Javascript files are precompiled with Babel (see test/utils/compile.js)
- using
appiumfor integrational testing See Appium setup intest/appiumfolder Please set correct version of your iOS simulator (9.3/10.0) intestConfig.jsIOS_VERSIONconst Tests are intest/specsfolder
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 .
- using
mocha-eslint
- tests are running on Travis
- implemented ready branches with tcmerge utility (see https://www.npmjs.com/package/tcmerge)
