-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat: add support for concurrent mode #1775
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
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/tannerlinsley/react-query/4un12itz7 |
b3308df
to
a666743
Compare
a666743
to
8d600bb
Compare
8d600bb
to
321ab19
Compare
321ab19
to
400d6ce
Compare
400d6ce
to
06e7ed8
Compare
06e7ed8
to
5c3b679
Compare
🎉 This PR is included in version 3.9.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I don't have a minimal repro at present, but I believe this change has broken |
Could you provide some more information? Does it only apply to infinite queries? What options are you using? Is your usage similar to https://github.com/tannerlinsley/react-query/tree/master/examples/nextjs ? |
My specific setup is using |
This PR adds support for concurrent mode rendering.
Render functions will now only have these side effects:
When calling a render function, it will return an optimistic result, without actually changing the observer state. The observer state will only be changed when new options are set/committed in an effect.
Unfortunately I was not able to keep the referential integrity of the result object between renders because we do not know which optimistic result will eventually get committed.
Fixes #1536