Summary
In this chapter, you learned about the FlatList
component in React Native. This component is general-purpose, as it doesn’t impose any specific look on the items that get rendered. Instead, the appearance of the list is up to you, leaving the FlatList
component to help with efficiently rendering a data source. The FlatList
component also provides a scrollable region for the items it renders.
You implemented an example that took advantage of section headers in list views. This is a good place to render static content such as list controls. You then learned about making network calls in React Native; it’s just like using fetch()
in any other web application.
Finally, you implemented lazy lists that scroll infinitely by only loading new items after you’ve scrolled to the bottom of what’s already been rendered. Also, we added a feature to refresh that list by means of a pull gesture.
In the next chapter, you’ll learn how to show the...