Weird results when keepPreviousData is used with transitions #3567
Unanswered
faradaytrs
asked this question in
Q&A
Replies: 1 comment
-
One more strange thing I noticed is fetching triggered by refetchOnWindowFocus doesn't cause fallback in suspense? Is it right behavior? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Sandbox link https://codesandbox.io/s/funny-leftpad-wf7kbz?file=/src/App.js
When I click decrease (in the second part of the example), I get unexpected results on example 2.2;
Because other suspense boundaries depend on the same state, useQuery waits for them to render and only starts fetching after transition is complete.
Can somebody explain why we get this result?
If i remove other two Suspense boundaries, everything seems normal.
With keepPreviousData on, it starts fetching only when transition is complete, not sure if it's bug
Beta Was this translation helpful? Give feedback.
All reactions