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: re-render when returned data and fallbackData is the same and keepPreviousData is enabled #2169

Merged
merged 3 commits into from
Oct 4, 2022

Conversation

koba04
Copy link
Collaborator

@koba04 koba04 commented Sep 23, 2022

Fixes #2128

This fixes an issue that happens when keepPreviousData is enabled and the returned data and the fallback data is the same.
In this case, we have to check the laggy data, not only the fallback data, to update returned data from laggy data to the latest data. Currently, an update is ignored if the latest data and the fallback are the same.

…epPreviousData is enabled

test: add a failed test for vercel#2128
@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 23, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 91b7611:

Sandbox Source
SWR-Basic Configuration
SWR-States Configuration
SWR-Infinite Configuration
SWR-SSR Configuration
magical-antonelli-lf3etx Issue #2128

@huozhi huozhi merged commit ea9bb27 into vercel:main Oct 4, 2022
@koba04 koba04 deleted the fix-2128 branch October 4, 2022 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stale data with fallbackData, keepPreviousData and disabled revalidation
3 participants