Grokking React Native
0% completed
Introduction to Lists in React Native
1,000 contacts given to a ScrollView create 1,000 rows on the first render. The same 1,000 contacts given to a FlatList create 10. Both components can show a long scrolling list, but that difference decides which one suits your data.
ScrollView, 1,000 contacts: 1000 rows mounted, Contact 1000 exists FlatList, 1,000 contacts: 10 rows mounted, Contact 11 does not exist yet
Almost every app shows a list of some kind, such as contacts, products, messages, or a news feed. The data usually comes from an API, a database or user input, so you cannot write each row by hand
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%