-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
57 lines (49 loc) · 911 Bytes
/
App.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
Platform,
StyleSheet,
Text,
View
} from 'react-native';
import Api from './Api';
export default class App extends Component<{}> {
state = {
users: []
};
async componentWillMount() {
let users = await Api.getUsers();
this.setState({users: users})
}
render() {
return (
<View style={styles.container}>
<Text style={styles.title}>Welcome to List</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
backgroundColor: '#F5FCFF',
},
listItem: {
padding: 20,
borderBottomWidth: 1,
borderBottomColor: '#cccc'
},
title: {
textAlign: 'center',
padding: 20,
fontSize: 20,
fontWeight: '700'
},
avatar: {
width: "100%",
height: 200
}
});