remove `remove` returned from useQuery
This PR attempts to fix #4684 of v5 milestones, In this PR:
- remove
removemethod fromqueryObserver - remove
removereturned fromuseQuery - remove
removereturned fromuseInfiniteQuery - update tests and docs accordingly
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 05143be8775de417eff909253846d2c7a9b2a7da:
| Sandbox | Source |
|---|---|
| @tanstack/query-example-react-basic-typescript | Configuration |
| @tanstack/query-example-solid-basic-typescript | Configuration |
| @tanstack/query-example-vue-basic | Configuration |
should I remove the remove method from the queryObserver class as well? (since it is not used anymore)
https://github.com/TanStack/query/blob/454482c4d1005d30235212a0cd44bac02be642da/packages/query-core/src/queryObserver.ts#L273
should I remove the remove method from the queryObserver class as well? (since it is not used anymore)
Yes please
should I remove the remove method from the queryObserver class as well? (since it is not used anymore)
Yes please
Done ✅
Codecov Report
:exclamation: No coverage uploaded for pull request base (
v5@af9ea86). Click here to learn what that means. Patch has no changes to coverable lines.
Additional details and impacted files
@@ Coverage Diff @@
## v5 #4702 +/- ##
=====================================
Coverage ? 92.38%
=====================================
Files ? 89
Lines ? 3741
Branches ? 981
=====================================
Hits ? 3456
Misses ? 269
Partials ? 16
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
PR needs to go to the v5 branch, not main please
Thank you 🙏 , please have a look at the comments.
We'd also need to add documentation to the migration guide, which is currently empty:
https://github.com/TanStack/query/blob/cfb15ef582e080c82c149cdcba998d3d5e570ae7/docs/react/guides/migrating-to-react-query-5.md#L6-L9
If you don't want to write something, let me know and I'll do it :)
I tried to write something using the description you wrote in the issue itself, Let me know if you want to change something in the wording 😅
@allcontributors add @Mamoanwar97 for code