Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.