feat: add support for React.use()#7988
Conversation
☁️ Nx Cloud ReportCI 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 targetsSent with 💌 from NxCloud. |
More templates
@tanstack/angular-query-devtools-experimental
@tanstack/eslint-plugin-query
@tanstack/angular-query-experimental
@tanstack/query-async-storage-persister
@tanstack/query-broadcast-client-experimental
@tanstack/query-devtools
@tanstack/query-core
@tanstack/query-persist-client-core
@tanstack/query-sync-storage-persister
@tanstack/react-query
@tanstack/react-query-devtools
@tanstack/react-query-next-experimental
@tanstack/solid-query
@tanstack/react-query-persist-client
@tanstack/solid-query-devtools
@tanstack/solid-query-persist-client
@tanstack/svelte-query
@tanstack/svelte-query-devtools
@tanstack/svelte-query-persist-client
@tanstack/vue-query
@tanstack/vue-query-devtools
commit: |
This comment was marked as outdated.
This comment was marked as outdated.
ec583d5 to
8cbd6a0
Compare
This comment was marked as outdated.
This comment was marked as outdated.
|
I added some docs |
|
since the whole feature is experimental (you need to opt into |
##### [`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
##### [`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
##### [`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
|
Hi @KATT, I came across the experimental_prefetchInRender property and think it would be a nice addition to allow prefetching during server-side rendering. Currently the prefetch branch is guarded with query/packages/react-query/src/useBaseQuery.ts Lines 144 to 159 in d07a3db Changing the type from |
Closes #7980
Progress
useQuery()useInfiniteQuery()