) : (
- // The data from the last successful page will remain
- // available while loading other pages
+ // `resolvedData` will either resolve to the latest page's data
+ // or if fetching a new page, the last successful page's data
{resolvedData.projects.map(project => (
-
- {project.name}
-
+
{project.name}
))}
)}
- Current Page: {page + 1}{' '}
+ Current Page: {page + 1}
{' '}
- {// Since the data stick around between page requests,
+ {// Since the last page's data potentially sticks around between page requests,
// we can use `isFetching` to show a background loading
// indicator since our `status === 'loading'` state won't be triggered
isFetching ? Loading... : null}{' '}