generated from calebnance/expo-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
43 lines (35 loc) · 830 Bytes
/
App.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
42
43
import * as React from 'react';
import { StatusBar } from 'react-native';
import AppLoading from 'expo-app-loading';
import { func } from './src/constants';
// root stack navigation
import RootStack from './src/navigation/RootStack';
class App extends React.Component {
constructor() {
super();
this.state = {
isLoading: true
};
}
render() {
const { isLoading } = this.state;
if (isLoading) {
return (
<AppLoading
onError={() => {
// console.warn
}}
onFinish={() => this.setState({ isLoading: false })}
startAsync={func.loadAssetsAsync}
/>
);
}
return (
<React.Fragment>
<StatusBar barStyle="dark-content" />
<RootStack />
</React.Fragment>
);
}
}
export default App;