-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
28 lines (24 loc) · 848 Bytes
/
App.tsx
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
import { LogBox } from "react-native";
import { NavigationContainer } from "@react-navigation/native";
import AppNavigator from "@/navigation/app-navigator";
import { Provider } from "react-redux";
import { persistor, store } from "src/store";
import { useEffect, useRef } from "react";
import NavigationService from "@/navigation/service";
import { PersistGate } from "redux-persist/integration/react";
export default function App() {
const containerRef = useRef(null);
useEffect(() => {
NavigationService.setTopLevelNavigator(containerRef);
}, []);
return (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<NavigationContainer ref={containerRef}>
<AppNavigator />
</NavigationContainer>
</PersistGate>
</Provider>
);
}
LogBox.ignoreLogs(["Non-serial"]);