query icon indicating copy to clipboard operation
query copied to clipboard

remove `remove` returned from useQuery

Open Mamoanwar97 opened this issue 2 years ago • 6 comments

This PR attempts to fix #4684 of v5 milestones, In this PR:

  • remove remove method from queryObserver
  • remove remove returned from useQuery
  • remove remove returned from useInfiniteQuery
  • update tests and docs accordingly

Mamoanwar97 avatar Dec 24 '22 15:12 Mamoanwar97

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

codesandbox-ci[bot] avatar Dec 24 '22 15:12 codesandbox-ci[bot]

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

Mamoanwar97 avatar Dec 24 '22 16:12 Mamoanwar97

should I remove the remove method from the queryObserver class as well? (since it is not used anymore)

Yes please

TkDodo avatar Dec 24 '22 18:12 TkDodo

should I remove the remove method from the queryObserver class as well? (since it is not used anymore)

Yes please

Done ✅

Mamoanwar97 avatar Dec 24 '22 19:12 Mamoanwar97

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.

codecov-commenter avatar Dec 25 '22 12:12 codecov-commenter

PR needs to go to the v5 branch, not main please

TkDodo avatar Dec 25 '22 12:12 TkDodo

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 😅

Mamoanwar97 avatar Dec 25 '22 18:12 Mamoanwar97

@allcontributors add @Mamoanwar97 for code

TkDodo avatar Dec 25 '22 18:12 TkDodo

@TkDodo

I've put up a pull request to add @Mamoanwar97! :tada:

allcontributors[bot] avatar Dec 25 '22 18:12 allcontributors[bot]