Skip to content

Instantly share code, notes, and snippets.

@mori-dev
Created September 25, 2017 01:55
Show Gist options
  • Save mori-dev/d09c0d8ce00b357dfc298177a8e64a78 to your computer and use it in GitHub Desktop.
Save mori-dev/d09c0d8ce00b357dfc298177a8e64a78 to your computer and use it in GitHub Desktop.
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