-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
41 lines (36 loc) · 1.16 KB
/
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
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import * as Font from 'expo-font';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import Users from './src/component/Users';
import { AppLoading } from 'expo';
const Stack = createStackNavigator();
export default class App extends React.Component {
constructor(props) {
super(props)
this.state = { fontLoad: false, posts: [] }
}
componentDidMount = async () => {
await Font.loadAsync({
'NotoSansCJKkrRegular': require('./src/assets/font/NotoSansCJKkr-Regular.otf'),
'NotoSansCJKkrBold': require('./src/assets/font/NotoSansCJKkr-Bold.otf'),
'NanumPen': require('./src/assets/font/NanumPen.ttf'),
})
this.setState({ fontLoad: true })
}
render() {
if (!this.state.fontLoad) {
return (
<AppLoading />
)
}
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen name="Users" component={Users} options={{ headerShown: false }}></Stack.Screen>
</Stack.Navigator>
</NavigationContainer>
);
}
}