Created
January 8, 2019 06:08
-
-
Save aloukissas/009caf4f8da306e0b661ab4f6a147cfd to your computer and use it in GitHub Desktop.
This file contains 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
import React from "react"; | |
import { Text, View, FlatList } from "react-native"; | |
export default class FlatListDemo extends React.Component { | |
state = { | |
data: [0, 1, 2, 3, 4] | |
}; | |
render() { | |
return ( | |
<View> | |
<FlatList | |
data={this.state.data} | |
renderItem={({ item }) => <Text>{`item ${item}`}</Text>} | |
/> | |
</View> | |
); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment