-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.js
More file actions
27 lines (23 loc) · 749 Bytes
/
index.js
File metadata and controls
27 lines (23 loc) · 749 Bytes
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
import React from "react";
import { registerRootComponent } from "expo";
import { Provider } from "react-redux";
import store, { storePersistor } from "./store";
import App from "./App";
import { PersistGate } from "redux-persist/es/integration/react";
import useCachedResources from "./hooks/useCachedResources";
import useSetupRemoteConfig from "./hooks/useSetupRemoteConfig";
const Main = () => {
const fontsLoaded = useCachedResources();
const settingUpRemoteConfig = useSetupRemoteConfig();
if (!fontsLoaded || settingUpRemoteConfig) {
return null;
}
return (
<Provider store={store}>
<PersistGate persistor={storePersistor}>
<App />
</PersistGate>
</Provider>
);
};
registerRootComponent(Main);