FlatList component displays a scrollable list of data that is changing but similar in structure. It works well with long lists of data, the number of elements of which can change over time. Unlike the more general
FlatList only displays the items that are currently displayed on the screen, not all items at once.
FlatList component requires two properties:
data- source of information for the list.
renderItemtakes one item from the source and returns a formatted component to render.
This example creates a basic
FlatList of hardcoded data. Each item in the data props is displayed as a text component. The
FlatListBasics component then displays the
FlatList and all text components.
Thanks goes to these wonderful people (emoji key):