Skip to content
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

feat: add support for React.use() #7988

Merged
merged 115 commits into from
Oct 1, 2024
Merged

Conversation

KATT
Copy link
Contributor

@KATT KATT commented Aug 30, 2024

Closes #7980


Progress

  • add basic functionality for useQuery()
  • make other tests pass (👋 help wanted!)
  • add test for useInfiniteQuery()
  • do more tests with some example
  • update docs?

Copy link

nx-cloud bot commented Aug 30, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit cb0dfb4. 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 2 targets

Sent with 💌 from NxCloud.

Copy link

pkg-pr-new bot commented Aug 30, 2024

Open in Stackblitz

More templates

@tanstack/angular-query-devtools-experimental

pnpm add https://pkg.pr.new/@tanstack/angular-query-devtools-experimental@7988

@tanstack/eslint-plugin-query

pnpm add https://pkg.pr.new/@tanstack/eslint-plugin-query@7988

@tanstack/angular-query-experimental

pnpm add https://pkg.pr.new/@tanstack/angular-query-experimental@7988

@tanstack/query-async-storage-persister

pnpm add https://pkg.pr.new/@tanstack/query-async-storage-persister@7988

@tanstack/query-broadcast-client-experimental

pnpm add https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@7988

@tanstack/query-devtools

pnpm add https://pkg.pr.new/@tanstack/query-devtools@7988

@tanstack/query-core

pnpm add https://pkg.pr.new/@tanstack/query-core@7988

@tanstack/query-persist-client-core

pnpm add https://pkg.pr.new/@tanstack/query-persist-client-core@7988

@tanstack/query-sync-storage-persister

pnpm add https://pkg.pr.new/@tanstack/query-sync-storage-persister@7988

@tanstack/react-query

pnpm add https://pkg.pr.new/@tanstack/react-query@7988

@tanstack/react-query-devtools

pnpm add https://pkg.pr.new/@tanstack/react-query-devtools@7988

@tanstack/react-query-next-experimental

pnpm add https://pkg.pr.new/@tanstack/react-query-next-experimental@7988

@tanstack/solid-query

pnpm add https://pkg.pr.new/@tanstack/solid-query@7988

@tanstack/react-query-persist-client

pnpm add https://pkg.pr.new/@tanstack/react-query-persist-client@7988

@tanstack/solid-query-devtools

pnpm add https://pkg.pr.new/@tanstack/solid-query-devtools@7988

@tanstack/solid-query-persist-client

pnpm add https://pkg.pr.new/@tanstack/solid-query-persist-client@7988

@tanstack/svelte-query

pnpm add https://pkg.pr.new/@tanstack/svelte-query@7988

@tanstack/svelte-query-devtools

pnpm add https://pkg.pr.new/@tanstack/svelte-query-devtools@7988

@tanstack/svelte-query-persist-client

pnpm add https://pkg.pr.new/@tanstack/svelte-query-persist-client@7988

@tanstack/vue-query

pnpm add https://pkg.pr.new/@tanstack/vue-query@7988

@tanstack/vue-query-devtools

pnpm add https://pkg.pr.new/@tanstack/vue-query-devtools@7988

commit: cb0dfb4

@KATT

This comment was marked as outdated.

@KATT

This comment was marked as outdated.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Sep 27, 2024
@KATT
Copy link
Contributor Author

KATT commented Sep 27, 2024

I added some docs

docs/reference/QueryClient.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@TkDodo TkDodo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ephem are you good with shipping this?

@TkDodo
Copy link
Collaborator

TkDodo commented Oct 1, 2024

since the whole feature is experimental (you need to opt into experimental_prefetchInRender for it to work), we can ship it and iterate later 🎉

@TkDodo TkDodo merged commit 18953be into TanStack:main Oct 1, 2024
8 checks passed
zemnmez-renovate-bot added a commit to zemn-me/monorepo that referenced this pull request Oct 1, 2024
##### [`v5.59.0](https://github.com/TanStack/query/releases/tag/v5.59.0)

Version 5.59.0 - 10/1/24, 3:45 PM

#### Changes

##### Feat

-   add support for `React.use()` ([#7988](TanStack/query#7988)) ([`18953be`](TanStack/query@18953be)) by [@KATT](https://github.com/KATT)

##### Docs

-   react-query: Fix broken route on eslint-plugin-query.md ([#8113](TanStack/query#8113)) ([`55a6155`](TanStack/query@55a6155)) by Gaurav Kumar
-   react-query: fix a typo in guides/ssr.md ([#8086](TanStack/query#8086)) ([`9227fd3`](TanStack/query@9227fd3)) by Morteza
-   angular-query: add rxjs example ([#8108](TanStack/query#8108)) ([`68ca717`](TanStack/query@68ca717)) by Arnoud

##### Other

-   ([`c12587a`](TanStack/query@c12587a)) by [@laurentlahmy](https://github.com/laurentlahmy)

#### Packages

-   [@tanstack/query-core](https://github.com/tanstack/query-core)[@5](https://github.com/5).59.0
-   [@tanstack/react-query](https://github.com/tanstack/react-query)[@5](https://github.com/5).59.0
-   [@tanstack/solid-query](https://github.com/tanstack/solid-query)[@5](https://github.com/5).59.0
-   [@tanstack/query-broadcast-client-experimental](https://github.com/tanstack/query-broadcast-client-experimental)[@5](https://github.com/5).59.0
-   [@tanstack/query-persist-client-core](https://github.com/tanstack/query-persist-client-core)[@5](https://github.com/5).59.0
-   [@tanstack/query-sync-storage-persister](https://github.com/tanstack/query-sync-storage-persister)[@5](https://github.com/5).59.0
-   [@tanstack/react-query-devtools](https://github.com/tanstack/react-query-devtools)[@5](https://github.com/5).59.0
-   [@tanstack/react-query-persist-client](https://github.com/tanstack/react-query-persist-client)[@5](https://github.com/5).59.0
-   [@tanstack/react-query-next-experimental](https://github.com/tanstack/react-query-next-experimental)[@5](https://github.com/5).59.0
-   [@tanstack/solid-query-devtools](https://github.com/tanstack/solid-query-devtools)[@5](https://github.com/5).59.0
-   [@tanstack/solid-query-persist-client](https://github.com/tanstack/solid-query-persist-client)[@5](https://github.com/5).59.0
-   [@tanstack/svelte-query](https://github.com/tanstack/svelte-query)[@5](https://github.com/5).59.0
-   [@tanstack/svelte-query-devtools](https://github.com/tanstack/svelte-query-devtools)[@5](https://github.com/5).59.0
-   [@tanstack/svelte-query-persist-client](https://github.com/tanstack/svelte-query-persist-client)[@5](https://github.com/5).59.0
-   [@tanstack/vue-query](https://github.com/tanstack/vue-query)[@5](https://github.com/5).59.0
-   [@tanstack/vue-query-devtools](https://github.com/tanstack/vue-query-devtools)[@5](https://github.com/5).59.0
-   [@tanstack/angular-query-experimental](https://github.com/tanstack/angular-query-experimental)[@5](https://github.com/5).59.0
-   [@tanstack/query-async-storage-persister](https://github.com/tanstack/query-async-storage-persister)[@5](https://github.com/5).59.0
-   [@tanstack/angular-query-devtools-experimental](https://github.com/tanstack/angular-query-devtools-experimental)[@5](https://github.com/5).59.0
zemnmez-renovate-bot added a commit to zemn-me/monorepo that referenced this pull request Oct 1, 2024
##### [`v5.59.0](https://github.com/TanStack/query/releases/tag/v5.59.0)

Version 5.59.0 - 10/1/24, 3:45 PM

#### Changes

##### Feat

-   add support for `React.use()` ([#7988](TanStack/query#7988)) ([`18953be`](TanStack/query@18953be)) by [@KATT](https://github.com/KATT)

##### Docs

-   react-query: Fix broken route on eslint-plugin-query.md ([#8113](TanStack/query#8113)) ([`55a6155`](TanStack/query@55a6155)) by Gaurav Kumar
-   react-query: fix a typo in guides/ssr.md ([#8086](TanStack/query#8086)) ([`9227fd3`](TanStack/query@9227fd3)) by Morteza
-   angular-query: add rxjs example ([#8108](TanStack/query#8108)) ([`68ca717`](TanStack/query@68ca717)) by Arnoud

##### Other

-   ([`c12587a`](TanStack/query@c12587a)) by [@laurentlahmy](https://github.com/laurentlahmy)

#### Packages

-   [@tanstack/query-core](https://github.com/tanstack/query-core)[@5](https://github.com/5).59.0
-   [@tanstack/react-query](https://github.com/tanstack/react-query)[@5](https://github.com/5).59.0
-   [@tanstack/solid-query](https://github.com/tanstack/solid-query)[@5](https://github.com/5).59.0
-   [@tanstack/query-broadcast-client-experimental](https://github.com/tanstack/query-broadcast-client-experimental)[@5](https://github.com/5).59.0
-   [@tanstack/query-persist-client-core](https://github.com/tanstack/query-persist-client-core)[@5](https://github.com/5).59.0
-   [@tanstack/query-sync-storage-persister](https://github.com/tanstack/query-sync-storage-persister)[@5](https://github.com/5).59.0
-   [@tanstack/react-query-devtools](https://github.com/tanstack/react-query-devtools)[@5](https://github.com/5).59.0
-   [@tanstack/react-query-persist-client](https://github.com/tanstack/react-query-persist-client)[@5](https://github.com/5).59.0
-   [@tanstack/react-query-next-experimental](https://github.com/tanstack/react-query-next-experimental)[@5](https://github.com/5).59.0
-   [@tanstack/solid-query-devtools](https://github.com/tanstack/solid-query-devtools)[@5](https://github.com/5).59.0
-   [@tanstack/solid-query-persist-client](https://github.com/tanstack/solid-query-persist-client)[@5](https://github.com/5).59.0
-   [@tanstack/svelte-query](https://github.com/tanstack/svelte-query)[@5](https://github.com/5).59.0
-   [@tanstack/svelte-query-devtools](https://github.com/tanstack/svelte-query-devtools)[@5](https://github.com/5).59.0
-   [@tanstack/svelte-query-persist-client](https://github.com/tanstack/svelte-query-persist-client)[@5](https://github.com/5).59.0
-   [@tanstack/vue-query](https://github.com/tanstack/vue-query)[@5](https://github.com/5).59.0
-   [@tanstack/vue-query-devtools](https://github.com/tanstack/vue-query-devtools)[@5](https://github.com/5).59.0
-   [@tanstack/angular-query-experimental](https://github.com/tanstack/angular-query-experimental)[@5](https://github.com/5).59.0
-   [@tanstack/query-async-storage-persister](https://github.com/tanstack/query-async-storage-persister)[@5](https://github.com/5).59.0
-   [@tanstack/angular-query-devtools-experimental](https://github.com/tanstack/angular-query-devtools-experimental)[@5](https://github.com/5).59.0
github-merge-queue bot pushed a commit to zemn-me/monorepo that referenced this pull request Oct 1, 2024
##### [`v5.59.0](https://github.com/TanStack/query/releases/tag/v5.59.0)

Version 5.59.0 - 10/1/24, 3:45 PM

#### Changes

##### Feat

-   add support for `React.use()` ([#7988](TanStack/query#7988)) ([`18953be`](TanStack/query@18953be)) by [@KATT](https://github.com/KATT)

##### Docs

-   react-query: Fix broken route on eslint-plugin-query.md ([#8113](TanStack/query#8113)) ([`55a6155`](TanStack/query@55a6155)) by Gaurav Kumar
-   react-query: fix a typo in guides/ssr.md ([#8086](TanStack/query#8086)) ([`9227fd3`](TanStack/query@9227fd3)) by Morteza
-   angular-query: add rxjs example ([#8108](TanStack/query#8108)) ([`68ca717`](TanStack/query@68ca717)) by Arnoud

##### Other

-   ([`c12587a`](TanStack/query@c12587a)) by [@laurentlahmy](https://github.com/laurentlahmy)

#### Packages

-   [@tanstack/query-core](https://github.com/tanstack/query-core)[@5](https://github.com/5).59.0
-   [@tanstack/react-query](https://github.com/tanstack/react-query)[@5](https://github.com/5).59.0
-   [@tanstack/solid-query](https://github.com/tanstack/solid-query)[@5](https://github.com/5).59.0
-   [@tanstack/query-broadcast-client-experimental](https://github.com/tanstack/query-broadcast-client-experimental)[@5](https://github.com/5).59.0
-   [@tanstack/query-persist-client-core](https://github.com/tanstack/query-persist-client-core)[@5](https://github.com/5).59.0
-   [@tanstack/query-sync-storage-persister](https://github.com/tanstack/query-sync-storage-persister)[@5](https://github.com/5).59.0
-   [@tanstack/react-query-devtools](https://github.com/tanstack/react-query-devtools)[@5](https://github.com/5).59.0
-   [@tanstack/react-query-persist-client](https://github.com/tanstack/react-query-persist-client)[@5](https://github.com/5).59.0
-   [@tanstack/react-query-next-experimental](https://github.com/tanstack/react-query-next-experimental)[@5](https://github.com/5).59.0
-   [@tanstack/solid-query-devtools](https://github.com/tanstack/solid-query-devtools)[@5](https://github.com/5).59.0
-   [@tanstack/solid-query-persist-client](https://github.com/tanstack/solid-query-persist-client)[@5](https://github.com/5).59.0
-   [@tanstack/svelte-query](https://github.com/tanstack/svelte-query)[@5](https://github.com/5).59.0
-   [@tanstack/svelte-query-devtools](https://github.com/tanstack/svelte-query-devtools)[@5](https://github.com/5).59.0
-   [@tanstack/svelte-query-persist-client](https://github.com/tanstack/svelte-query-persist-client)[@5](https://github.com/5).59.0
-   [@tanstack/vue-query](https://github.com/tanstack/vue-query)[@5](https://github.com/5).59.0
-   [@tanstack/vue-query-devtools](https://github.com/tanstack/vue-query-devtools)[@5](https://github.com/5).59.0
-   [@tanstack/angular-query-experimental](https://github.com/tanstack/angular-query-experimental)[@5](https://github.com/5).59.0
-   [@tanstack/query-async-storage-persister](https://github.com/tanstack/query-async-storage-persister)[@5](https://github.com/5).59.0
-   [@tanstack/angular-query-devtools-experimental](https://github.com/tanstack/angular-query-devtools-experimental)[@5](https://github.com/5).59.0
@KATT KATT deleted the discussions-7980-promises branch October 1, 2024 18:51
@jxom jxom mentioned this pull request Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants