Created
September 25, 2017 01:55
-
-
Save mori-dev/d09c0d8ce00b357dfc298177a8e64a78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Root } from 'native-base'; | |
import * as Expo from 'expo'; | |
import { AppNavigator } from './routes'; | |
export default class App extends React.Component { | |
constructor() { | |
super(); | |
this.state = { | |
readyFlag: false, | |
}; | |
} | |
async componentWillMount() { | |
await Expo.Font.loadAsync({ | |
'Ionicons': require('@expo/vector-icons/fonts/Ionicons.ttf'), | |
}); | |
this.setState({ readyFlag: true }); | |
} | |
render() { | |
if (!this.state.readyFlag) { | |
return <Expo.AppLoading />; | |
} | |
return ( | |
<Root> | |
<AppNavigator /> | |
</Root> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment