-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
31 lines (27 loc) · 848 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
27
28
29
30
31
import React from 'react';
import {SafeAreaProvider} from 'react-native-safe-area-context';
import AppNavigator from './src/navigation';
import {getStore, getPersistor} from './src/redux';
import {Provider} from 'react-redux';
import {PersistGate} from 'redux-persist/integration/react';
import {StyledText} from './src/components/atoms';
const App = () => {
const store = getStore();
const persistor = getPersistor();
const onBeforeLift = () => {
//Do some stuff that when redux has initialized
};
return (
<SafeAreaProvider>
<Provider store={store}>
<PersistGate
loading={<StyledText>Loading...</StyledText>}
persistor={persistor}
onBeforeLift={onBeforeLift}>
<AppNavigator />
</PersistGate>
</Provider>
</SafeAreaProvider>
);
};
export default App;