-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApp.js
More file actions
22 lines (19 loc) · 746 Bytes
/
Copy pathApp.js
File metadata and controls
22 lines (19 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import React from 'react';
import Main from './components/MainComponent';
import { Provider } from 'react-redux';
import { ConfigureStore } from './redux/configureStore';
import { PersistGate } from 'redux-persist/es/integration/react'; // integration with React / React Native
import { Loading } from './components/LoadingComponent';
const { persistor, store } = ConfigureStore(); // instead of const store
export default function App() {
return (
<Provider store={store}>
<PersistGate // takes the loading attr with a component that will display the loading message on the screen, and the persistor
loading={<Loading />}
persistor={persistor}
>
<Main />
</PersistGate>
</Provider>
);
}