1 | import 'babel-polyfill'
|
2 | import React from 'react'
|
3 | import { AppRegistry } from 'react-native'
|
4 | import logger from 'redux-logger'
|
5 | import { storageEnhancer } from './shared/redux-persist';
|
6 | import storage from 'redux-persist/lib/storage'
|
7 | import Application from './shared/core'
|
8 | import Router from './routes'
|
9 | import appModel from './models/index'
|
10 |
|
11 | const app = Application({
|
12 | initialState: {},
|
13 | models: [ appModel ],
|
14 | extraEnhancers: [
|
15 | storageEnhancer({
|
16 | key: 'MoleStarter',
|
17 | storage
|
18 | })
|
19 | ],
|
20 | onAction: [ logger ],
|
21 | onError(e) {
|
22 | console.log('onError', e)
|
23 | },
|
24 | })
|
25 |
|
26 | const App = app.start(<Router />)
|
27 | AppRegistry.registerComponent('App', () => App);
|
28 |
|
29 | AppRegistry.runApplication('App', {
|
30 | rootTag: document.getElementById('root')
|
31 | });
|
32 |
|
33 |
|
\ | No newline at end of file |