You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/framework/react/guides/advanced-ssr.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -530,7 +530,7 @@ export default function Posts() {
530
530
531
531
Now, your `getPosts` function can return e.g. `Temporal` datetime objects and the data will be serialized and deserialized on the client, assuming your transformer can serialize and deserialize those data types.
532
532
533
-
For more information, check out the [Next.js App with Prefetching Example](../examples/react/nextjs-app-prefetching).
533
+
For more information, check out the [Next.js App with Prefetching Example](../examples/nextjs-app-prefetching).
534
534
535
535
## Experimental streaming without prefetching in Next.js
For more information, check out the [NextJs Suspense Streaming Example](../examples/react/nextjs-suspense-streaming).
600
+
For more information, check out the [NextJs Suspense Streaming Example](../examples/nextjs-suspense-streaming).
601
601
602
602
The big upside is that you no longer need to prefetch queries manually to have SSR work, and it even still streams in the result! This gives you phenomenal DX and lower code complexity.
- Additionally, you can use the `useQuery().promise` and `React.use()` (Experimental)
12
12
13
-
When using suspense mode, `status` states and `error` objects are not needed and are then replaced by usage of the `React.Suspense` component (including the use of the `fallback` prop and React error boundaries for catching errors). Please read the [Resetting Error Boundaries](#resetting-error-boundaries) and look at the [Suspense Example](../examples/react/suspense) for more information on how to set up suspense mode.
13
+
When using suspense mode, `status` states and `error` objects are not needed and are then replaced by usage of the `React.Suspense` component (including the use of the `fallback` prop and React error boundaries for catching errors). Please read the [Resetting Error Boundaries](#resetting-error-boundaries) and look at the [Suspense Example](../examples/suspense) for more information on how to set up suspense mode.
14
14
15
15
If you want mutations to propagate errors to the nearest error boundary (similar to queries), you can set the `throwOnError` option to `true` as well.
For more information, check out the [NextJs Suspense Streaming Example](../examples/react/nextjs-suspense-streaming) and the [Advanced Rendering & Hydration](./advanced-ssr.md) guide.
175
+
For more information, check out the [NextJs Suspense Streaming Example](../examples/nextjs-suspense-streaming) and the [Advanced Rendering & Hydration](./advanced-ssr.md) guide.
176
176
177
177
## Using `useQuery().promise` and `React.use()` (Experimental)
Copy file name to clipboardExpand all lines: docs/reference/streamedQuery.md
+6
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,11 @@ title: streamedQuery
5
5
6
6
`streamedQuery` is a helper function to create a query function that streams data from an [AsyncIterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AsyncIterator). Data will be an Array of all the chunks received. The query will be in a `pending` state until the first chunk of data is received, but will go to `success` after that. The query will stay in fetchStatus `fetching` until the stream ends.
7
7
8
+
To see `streamedQuery` in action, take a look at our [chat example](../framework/react/examples/chat).
> Note: `streamedQuery` is currently marked as `experimental` because we want to gather feedback from the community. If you've tried out the API and have feedback for us, please provide it in this [GitHub discussion](https://github.com/TanStack/query/discussions/9065).
0 commit comments