-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.js
26 lines (23 loc) · 862 Bytes
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import React from 'react'
import { StatusBar } from 'react-native'
import { createStore, applyMiddleware } from 'redux'
import { Provider } from 'react-redux'
import thunk from 'redux-thunk'
import { persistStore } from 'redux-persist'
import { PersistGate } from 'redux-persist/integration/react'
import reducers from './src/reducers'
import Router from './src/Router'
import LoadingView from './src/components/LoadingView'
import AppStateHandlerContainer from './src/containers/AppStateHandler'
const store = createStore(reducers, applyMiddleware(thunk))
const persistor = persistStore(store)
const App = () => (
<Provider store={store}>
<PersistGate loading={<LoadingView />} persistor={persistor}>
<AppStateHandlerContainer />
<StatusBar barStyle="light-content" />
<Router />
</PersistGate>
</Provider>
)
export default App