Skip to content
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

fix: do not suspend on subsequent page loads #531

Merged
merged 1 commit into from
Jun 2, 2020
Merged

fix: do not suspend on subsequent page loads #531

merged 1 commit into from
Jun 2, 2020

Conversation

swandir
Copy link
Contributor

@swandir swandir commented May 29, 2020

As described in #503, usePaginatedQuery shouldn't suspend during subsequent page loads, but it currently does.

handleSuspense suspend on status === 'loading'.
usePaginatedQuery changes returned status from 'loading' to 'success' if resolvedData is available, but passes to handleSuspense an object that contains old status value.

This PR fixes this by passing the object with updated status to handleSuspense.

@tannerlinsley tannerlinsley merged commit 342c1fb into TanStack:master Jun 2, 2020
@tannerlinsley
Copy link
Collaborator

🎉 This PR is included in version 1.5.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants