-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
index.js
41 lines (38 loc) · 1.22 KB
/
index.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
36
37
38
39
40
41
import React from "react";
import { registerRootComponent } from "expo";
import { Provider as ReduxProvider } from "react-redux";
import { QueryClient, QueryClientProvider } from "react-query";
import PubNub from "pubnub";
import { PubNubProvider, usePubNub } from "pubnub-react";
import { ToastProvider } from "react-native-fast-toast";
import App from "./App";
import { store, persistor } from "./src/store/store";
import { PersistGate } from "redux-persist/integration/react";
import RtcProvider from "./src/contexts/rtcContext";
import { ThemeProvider } from "./src/contexts/theme/provider";
import { RoomProvider } from "./src/contexts/room/provider";
const queryClient = new QueryClient({
defaultConfig: {
queries: {
cacheTime: 0,
},
},
});
const Root = () => (
<ReduxProvider store={store}>
<PersistGate persistor={persistor}>
<QueryClientProvider client={queryClient}>
<RtcProvider>
<ToastProvider>
<ThemeProvider>
<RoomProvider>
<App />
</RoomProvider>
</ThemeProvider>
</ToastProvider>
</RtcProvider>
</QueryClientProvider>
</PersistGate>
</ReduxProvider>
);
registerRootComponent(Root);