-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Bugfix/keep previous data error #1665
Bugfix/keep previous data error #1665
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/tannerlinsley/react-query/aj37fbalz |
expect(states[2]).toMatchObject({ | ||
data: 0, | ||
isFetching: true, | ||
status: 'success', | ||
error: null, | ||
isPreviousData: true, | ||
}) | ||
// Hook state update | ||
expect(states[3]).toMatchObject({ | ||
data: 0, | ||
isFetching: true, | ||
status: 'success', | ||
error: null, | ||
isPreviousData: true, | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not really sure why we get two re-renders with the same state, but this is the same for the already existing keepPreviousData
tests 🤔
🎉 This PR is included in version 3.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
closes #1659