-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.tsx
More file actions
34 lines (28 loc) · 1.12 KB
/
App.tsx
File metadata and controls
34 lines (28 loc) · 1.12 KB
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
import 'react-native-gesture-handler';
import {NativeModules, LogBox} from 'react-native';
import store from 'appRedux';
import {SafeAreaProvider} from 'react-native-safe-area-context';
import {enableScreens} from 'react-native-screens';
import {Provider} from 'react-redux';
import {persistStore} from 'redux-persist';
import {PersistGate} from 'redux-persist/integration/react';
import {ENV} from 'types/index';
import ErrorBoundary from './src/components/ErrorLayer/ErrorBoundary';
import ErrorScreen from './src/components/ErrorLayer/ErrorScreen';
import AppWithNavigationState from './src/navigation/AppWithNavigationState';
enableScreens();
const persistor = persistStore(store);
export const env: ENV = NativeModules.RNConfig.env;
LogBox.ignoreLogs(['RNConfig']); // Ignore log notification from RNConfig
const App = () => (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<SafeAreaProvider>
<ErrorBoundary FallbackComponent={ErrorScreen}>
<AppWithNavigationState />
</ErrorBoundary>
</SafeAreaProvider>
</PersistGate>
</Provider>
);
export default App;