Skip to content

Instantly share code, notes, and snippets.

@Yassir4
Created September 15, 2020 08:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yassir4/6a3e947105b334c7f28e288fbe735300 to your computer and use it in GitHub Desktop.
Save Yassir4/6a3e947105b334c7f28e288fbe735300 to your computer and use it in GitHub Desktop.
Repositories
const handleOnEndReached = () => {
if (data.organization.repositories.pageInfo.hasNextPage)
return fetchMore({
variables: {
after: data.organization.repositories.pageInfo.endCursor,
first: 15,
},
updateQuery: onUpdate,
})
}
.
.
.
<FlatList
...
onEndReachedThreshold={1}
onEndReached={handleOnEndReached}
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment