Skip to content

docs: update infinite query fetchNextPage examples #9172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2025

Conversation

Laci556
Copy link
Contributor

@Laci556 Laci556 commented May 21, 2025

This PR updates the fetchNextPage examples of useInfiniteQuery. When used with a persister, checking isFetchingNextPage is not enough to control if the next page can be fetched as the initial queryFn might still be running while the cached data is displayed. Using isFetching instead of isFetchingNextPage prevents silently cancelling the request.

Related issues: #5583, #6709, #9166

@github-actions github-actions bot added the documentation Improvements or additions to documentation label May 21, 2025
@TkDodo TkDodo merged commit 09a55bf into TanStack:main May 22, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants