query
query copied to clipboard
[WIP] New useQueryState Hook
Closes https://github.com/TanStack/query/discussions/6756
TODO:
- [ ] Fix any broken tests
- [x] Migrate
useQueryStatelogic touseMutationState - [ ] Add working tests for
useQueryState - [ ] Mark
useIsFetchingas deprecated - [ ] Mark
useIsMutatingas deprecated - [ ] Update docs to note deprecated fields
- [ ] Add reference docs
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| query | ⬜️ Ignored (Inspect) | Visit Preview | Feb 3, 2024 11:23am |
☁️ Nx Cloud Report
CI is running/has finished running commands for commit 05e18d36082e094fb400727c429f521681907f5a. 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 target
Sent 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 05e18d36082e094fb400727c429f521681907f5a:
| Sandbox | Source |
|---|---|
| @tanstack/query-example-angular-basic | Configuration |
| @tanstack/query-example-react-basic-typescript | Configuration |
| @tanstack/query-example-solid-basic-typescript | Configuration |
| @tanstack/query-example-svelte-basic | Configuration |
| @tanstack/query-example-vue-basic | Configuration |
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 useFetching API that's been changed.
While debugging, I've noticed the following:
notifyManager.schedule(onStoreChange)inuseQueryStateis called properly with the single itemonStoreChangeis not ever called
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 sleep(10) that I've resolved by replacing with new Promise changes.
Codecov Report
Attention: 2 lines in your changes are missing coverage. Please review.
Comparison is base (
c190f68) 41.78% compared to head (05e18d3) 85.09%.
| Files | Patch % | Lines |
|---|---|---|
| packages/react-query/src/useQueryState.ts | 90.00% | 2 Missing :warning: |
:exclamation: 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
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.