ReactNativeStarterKit
v1.0.0
Published
React Native Starter Kit with Redux - crossplatform for iOS and Android
Downloads
7
Maintainers
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 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
Unit and components tests:
mocha
,sinon
,chai
for unit tests You can find tests example inapp/auth
folder forauth.reducer
enzyme
andreact-native-mock
for components testing See example inapp/common/components
forButton
Note:
Javascript files are precompiled with Babel (see test/utils/compile.js
)
Integration testing:
- using
appium
for integrational testing See Appium setup intest/appium
folder Please set correct version of your iOS simulator (9.3/10.0) intestConfig.js
IOS_VERSION
const Tests are intest/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:
- tests are running on Travis
- implemented ready branches with tcmerge utility (see https://www.npmjs.com/package/tcmerge)