diff options
author | Alexander NeonXP Kiryukhin <a.kiryukhin@mail.ru> | 2019-06-11 02:51:30 +0300 |
---|---|---|
committer | Alexander NeonXP Kiryukhin <a.kiryukhin@mail.ru> | 2019-06-11 02:51:30 +0300 |
commit | f12a3bccd8c726e59e92123a3d8ef1f5a73d7253 (patch) | |
tree | d4b6e126c0f216972562621608a4ba97800a94bf /App.js | |
parent | b7810c3d6c0164def328c60244bfbd20d7935bc3 (diff) |
Fixes
Diffstat (limited to 'App.js')
-rw-r--r-- | App.js | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -1,8 +1,18 @@ import React from 'react'; import { Provider } from 'react-redux'; +import { PersistGate } from 'redux-persist/integration/react'; +import createStore from './src/Store/store'; import Main from './src/Main'; -import store from './src/Store/store' +import { ActivityIndicator, Text, View } from 'react-native'; -const App = () => (<Provider store={store}><Main /></Provider>) +const { store, persistor } = createStore(); -export default App
\ No newline at end of file +const loading = (<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}><ActivityIndicator /><Text>Загрузка состояния...</Text></View>); + +const App = () => (<Provider store={store}> + <PersistGate loading={loading} persistor={persistor}> + <Main /> + </PersistGate> +</Provider>); + +export default App;
\ No newline at end of file |