A performant interface for rendering basic, flat lists, supporting the most handy features:
- Fully cross-platform.
- Optional horizontal mode.
- Configurable viewability callbacks.
- Header support.
- Footer support.
- Separator support.
- Pull to Refresh.
- Scroll loading.
- ScrollToIndex support.
- Multiple column support.
Promise based HTTP client for the browser and node.js
For more details : https://github.com/axios/axios
getContacts = async () => {
const { data: { results: contacts }} = await axios.get('https://randomuser.me/api/?results=15');
this.setState({
contacts
});
};
FlatList use :
render() {
return (
<FlatList
ListHeaderComponent={this.renderHeader()}
renderItem={this.renderContactsItem}
keyExtractor={item => item.login.uuid}
data={this.state.contacts}/>
);
}