-
Notifications
You must be signed in to change notification settings - Fork 2
/
App.js
36 lines (30 loc) · 628 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
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React from "react";
import Expo from "expo";
import Ionicons from "@expo/vector-icons/fonts/Ionicons.ttf";
import App from "./src/App";
const { AppLoading, Font } = Expo;
export default class ExpoApp extends App {
state = {
isReady: false
};
componentWillMount() {
this.loadFonts();
}
async loadFonts() {
await Font.loadAsync({
Ionicons
});
this.setState({ isReady: true });
}
render() {
if (!this.state.isReady) {
return <AppLoading />;
}
return super.render();
}
}