summaryrefslogtreecommitdiff
path: root/App.js
diff options
context:
space:
mode:
authorAlexander NeonXP Kiryukhin <a.kiryukhin@mail.ru>2019-06-11 02:51:30 +0300
committerAlexander NeonXP Kiryukhin <a.kiryukhin@mail.ru>2019-06-11 02:51:30 +0300
commitf12a3bccd8c726e59e92123a3d8ef1f5a73d7253 (patch)
treed4b6e126c0f216972562621608a4ba97800a94bf /App.js
parentb7810c3d6c0164def328c60244bfbd20d7935bc3 (diff)
Fixes
Diffstat (limited to 'App.js')
-rw-r--r--App.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/App.js b/App.js
index c73914b..77d5f78 100644
--- a/App.js
+++ b/App.js
@@ -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