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
- A route that will be used as the default not found route for every branch of the route tree. This can be overridden on a per-branch basis by providing a not found route to the `NotFoundRoute` option on the root route of the branch.
262
262
263
-
### `errorSerializer` property
264
-
265
-
- Type: [`RouterErrorSerializer`]
266
-
- Optional
267
-
- The serializer object that will be used to determine how errors are serialized and deserialized between the server and the client.
268
-
269
-
#### `errorSerializer.serialize` method
270
-
271
-
- Type: `(err: unknown) => TSerializedError`
272
-
- This method is called to define how errors are serialized when they are stored in the router's dehydrated state.
273
-
274
-
#### `errorSerializer.deserialize` method
275
-
276
-
- Type: `(err: TSerializedError) => unknown`
277
-
- This method is called to define how errors are deserialized from the router's dehydrated state.
Copy file name to clipboardExpand all lines: docs/router/framework/react/guide/external-data-loading.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,7 +141,7 @@ Tools that are able can integrate with TanStack Router's convenient Dehydration/
141
141
142
142
**For critical data needed for the first render/paint**, TanStack Router supports **`dehydrate` and `hydrate`** options when configuring the `Router`. These callbacks are functions that are automatically called on the server and client when the router dehydrates and hydrates normally and allow you to augment the dehydrated data with your own data.
143
143
144
-
The `dehydrate` function can return any serializable JSON data which will get merged and injected into the dehydrated payload that is sent to the client. This payload is delivered via the `DehydrateRouter` component which, when rendered, provides the data back to you in the `hydrate` function on the client.
144
+
The `dehydrate` function can return any serializable JSON data which will get merged and injected into the dehydrated payload that is sent to the client.
145
145
146
146
For example, let's dehydrate and hydrate a TanStack Query `QueryClient` so that our data we fetched on the server will be available for hydration on the client.
0 commit comments