-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[WIP] New useQueryState Hook #6758
base: main
Are you sure you want to change the base?
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 05e18d3. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent 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. Latest deployment of this branch, based on commit 05e18d3:
|
There appear to be two failing tests on this PR and I can't seem to figure out why they're failing. Namely, they are the While debugging, I've noticed the following:
I can't seem to figure out why this is the case or why it works in the other tests, but not these. It also appears that there's some timing issues with |
the value of the ref can get out of sync if we only write the ref in the subscribe function
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #6758 +/- ##
===========================================
+ Coverage 41.78% 85.09% +43.30%
===========================================
Files 178 24 -154
Lines 7017 322 -6695
Branches 1421 83 -1338
===========================================
- Hits 2932 274 -2658
+ Misses 3722 39 -3683
+ Partials 363 9 -354 ☔ View full report in Codecov by Sentry. |
// Memo to avoid other `useMutation` hook causing a re-render | ||
const IsMutating = React.memo(IsMutatingBase) | ||
|
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 think it's also fine to change the assertion here to 0,1,1,0 instead.
Closes #6756
TODO:
useQueryState
logic touseMutationState
useQueryState
useIsFetching
as deprecateduseIsMutating
as deprecated