UNPKG

707 BJavaScriptView Raw
1import React from 'react'
2import { AppRegistry, Platform, AsyncStorage } from 'react-native'
3import { storageEnhancer } from './shared/redux-persist';
4
5import Application from './shared/core'
6import Router, { routerMiddleware, routerReducer } from './routes'
7import homeModel from './models/index'
8
9const app = Application({
10 initialState: {},
11 models: [ homeModel ],
12 extraReducers: {
13 router: routerReducer
14 },
15 onAction: [routerMiddleware],
16 extraEnhancers: [
17 storageEnhancer({
18 key: 'MoleStarter',
19 storage: AsyncStorage
20 })
21 ],
22 onError(e) {
23 console.log('onError', e)
24 },
25})
26
27const App = app.start(<Router />)
28
29AppRegistry.registerComponent('MoleStarter', () => App);
30
31
\No newline at end of file