Skip to content

Instantly share code, notes, and snippets.

@nicholasess
Created February 4, 2018 17:43
Show Gist options
  • Save nicholasess/a54441fb68f2815eb8227bb34596a45b to your computer and use it in GitHub Desktop.
Save nicholasess/a54441fb68f2815eb8227bb34596a45b to your computer and use it in GitHub Desktop.
export default class App extends Component {
state = {
data: data
}
renderItem = ({item}) => {
return (<View>
<Image source={{uri: item.avatar}} style={styles.itemImage} />
</View>)
}
render() {
return (
<View style={styles.container}>
<FlatList
keyExtractor={(_, index) => index}
numColumns={numberGrid} data={this.state.data}
renderItem={this.renderItem} />
</View>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment