UNPKG

752 BJavaScriptView Raw
1import 'babel-polyfill'
2import React from 'react'
3import { AppRegistry } from 'react-native'
4import logger from 'redux-logger'
5import { storageEnhancer } from './shared/redux-persist';
6import storage from 'redux-persist/lib/storage'
7import Application from './shared/core'
8import Router from './routes'
9import appModel from './models/index'
10
11const 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
26const App = app.start(<Router />)
27AppRegistry.registerComponent('App', () => App);
28
29AppRegistry.runApplication('App', {
30 rootTag: document.getElementById('root')
31});
32
33
\No newline at end of file