Created
February 4, 2018 17:43
-
-
Save nicholasess/a54441fb68f2815eb8227bb34596a45b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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