1 | import React from 'react'
|
2 | import { AppRegistry, Platform, AsyncStorage } from 'react-native'
|
3 | import { storageEnhancer } from './shared/redux-persist';
|
4 |
|
5 | import Application from './shared/core'
|
6 | import Router, { routerMiddleware, routerReducer } from './routes'
|
7 | import homeModel from './models/index'
|
8 |
|
9 | const 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 |
|
27 | const App = app.start(<Router />)
|
28 |
|
29 | AppRegistry.registerComponent('MoleStarter', () => App);
|
30 |
|
31 |
|
\ | No newline at end of file |