Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(examples/react): fix prefetch pagination logic when trying to qu…
…ickly get to the last page (#4564) * bugfix/pagination-example-fetch-next-page: fix basing decision whether next page should be refetched on information from two pages prior In the useQuery call we set "keepPreviousData", so we must make sure that for fetching the next page we don't base our logic on the data from potentially two pages away. If user would click very fast to get to the last page we would potentially load eleventh page and that could result in an error depending on the backend implementation. * bugfix/pagination-example-fetch-next-page: update useEffect dependency array to reflect all used variables
- Loading branch information