-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.tsx
30 lines (29 loc) · 891 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
29
30
import { StatusBar } from 'expo-status-bar';
import { registerRootComponent } from 'expo';
import app from './app.config.js';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { RecoilRoot } from 'recoil';
import useCachedResources from './hooks/useCachedResources';
import Navigation from './navigation/Navigation';
import './config/firebase';
import { AppRegistry, Platform } from 'react-native';
export default function App() {
const isLoadingComplete = useCachedResources();
if (!isLoadingComplete) {
return null;
} else {
return (
<SafeAreaProvider>
<RecoilRoot>
<Navigation />
<StatusBar style="dark" />
</RecoilRoot>
</SafeAreaProvider>
);
}
}
if (Platform.OS === 'android') {
registerRootComponent(App);
} else {
AppRegistry.registerComponent(app.expo.name.toLowerCase(), () => App);
}