diff options
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 |