Skip to content

Instantly share code, notes, and snippets.

@ho3ein-mola
Created March 26, 2018 10:47
Show Gist options
  • Save ho3ein-mola/f8e63db351a4e4886285ef036aa711bd to your computer and use it in GitHub Desktop.
Save ho3ein-mola/f8e63db351a4e4886285ef036aa711bd to your computer and use it in GitHub Desktop.
import React from "react";
import { StatusBar } from "react-native";
import { Container, Button, text, ListItem, Text } from "native-base";
import Expo from "expo";
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = { loading: true };
}
async componentWillMount() {
await Expo.Font.loadAsync({
Roboto: require("native-base/Fonts/Roboto.ttf"),
Roboto_medium: require("native-base/Fonts/Roboto_medium.ttf"),
Ionicons: require("@expo/vector-icons/fonts/Ionicons.ttf"),
});
this.setState({ loading: false });
}
render() {
if (this.state.loading) {
return <Expo.AppLoading />;
}
return (
<Container>
<StatusBar hidden={true} />
<Button>
<Text>Button</Text>
</Button>
<ListItem />
</Container>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment