-
Notifications
You must be signed in to change notification settings - Fork 11
/
App.js
35 lines (30 loc) · 903 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
32
33
34
35
import React, {useEffect} from 'react';
import AppNavigator from './src/navigation/AppNavigator';
import FlashMessage from 'react-native-flash-message';
import {Provider} from 'react-redux';
import {store} from './src/context/store';
import {PersistGate} from 'redux-persist/integration/react';
import {persistStore} from 'redux-persist';
import inAppMessaging from '@react-native-firebase/in-app-messaging';
const App = () => {
const perStore = persistStore(store);
async function bootstrap() {
await inAppMessaging()
.setMessagesDisplaySuppressed(true)
.then(response => {
console.log(response);
});
}
useEffect(() => {
bootstrap();
}, []);
return (
<Provider store={store}>
<PersistGate persistor={perStore}>
<AppNavigator />
<FlashMessage position="top" />
</PersistGate>
</Provider>
);
};
export default App;