Skip to content

Instantly share code, notes, and snippets.

@mori-dev mori-dev/App.js
Created Sep 25, 2017

Embed
What would you like to do?
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
You can’t perform that action at this time.