-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
43 lines (36 loc) · 1018 Bytes
/
main.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
37
38
39
40
41
42
43
import Expo,{Font} from 'expo';
import React from 'react';
import Tasklist from './components/TaskList';
import { StyleSheet, Text, View } from 'react-native';
class App extends React.Component {
async componentDidMount() {
await Font.loadAsync({
'Roboto-Regular': require('./assets/fonts/Roboto-Regular.ttf'),
'Roboto-Light': require('./assets/fonts/Roboto-Light.ttf'),
'Roboto-LightItalic': require('./assets/fonts/Roboto-LightItalic.ttf'),
});
this.setState({fontLoaded: true});
}
constructor(props) {
super(props);
this.state = {
fontLoaded: false,
}
}
render() {
return (this.state.fontLoaded ?
<View style={styles.container}>
<Tasklist/>
</View>:null
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#171c32',
alignItems: 'center',
justifyContent: 'center',
},
});
Expo.registerRootComponent(App);