Now we'll implement pull-to-refresh and refetch the data on Stories and Bookmarks. To do this, we'll create React component state in the HomeScreen
to track whether the component is refreshing or not.
We'll set the FlatList
with refreshing
and onRefresh
properties to allow for the native refresh behavior you would expect from an app.
Resources:
Checkpoint: Add pull to refresh