-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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(react-query): fix missed updates between creation and subscription #5474
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 5044427. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 2 targetsSent with 💌 from NxCloud. |
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. |
|
||
// Update result to make sure we did not miss any query updates | ||
// between creating the observer and subscribing to it. | ||
observer.updateResult() |
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.
Looks interesting, I'll try to test it in my project
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.
So, I can not do it, cause of workspace: *
in a build(
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.
codesandbox preview seems to be having issues right now. You could patch-package the fix in your project, or we just ship it and trust the test coverage.
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.
The main problem, that I cannot patch) It's to long story to describe)
Let's ship it, cause looks like this fix might help.
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #5474 +/- ##
==========================================
+ Coverage 91.79% 92.24% +0.44%
==========================================
Files 101 39 -62
Lines 3890 1264 -2626
Branches 974 358 -616
==========================================
- Hits 3571 1166 -2405
+ Misses 298 92 -206
+ Partials 21 6 -15
☔ View full report in Codecov by Sentry. |
}, | ||
}) | ||
|
||
// this simulates a synchronous update between the time the query is created |
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.
Please, correct me if I'm wrong, It's not important that the update was synchronous or asynchronous? You've used the synchronous update just because it's easer to test?
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.
Yes, exactly
@TkDodo good news, we've tested the latest version of react-query and everything is ok right now! THX a lot) @ericbiewener I can recommend you to update react-query to 4.29.12 |
closes #5443