Lists comparison - jellyfish-tom/TIL GitHub Wiki

React Native provides a suite of components for presenting lists of data. Generally, you'll want to use either FlatList or SectionList.

FlatList

FlatList component displays a scrolling list of changing, but similarly structured, data. FlatList works well for long lists of data, where the number of items might change over time. FlatList only renders elements that are currently showing on the screen, not all the elements at once.

SectionList

SectionList is basically FlatList with data grouped in sections.

ScrollView

It renders all elements at once

The ScrollView is a generic scrolling container that can contain multiple components and views. The scrollable items can be heterogeneous, and you can scroll both vertically and horizontally (by setting the horizontal property).

The ScrollView works best to present a small number of things of a limited size. All the elements and views of a ScrollView are rendered, even if they are not currently shown on the screen.