Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

DehydratedState.md

17 lines839 Bytes

1---
2id: DehydratedState
3title: DehydratedState
4---
5​
6Defined in: [packages/query-core/src/hydration.ts:102](https://github.com/TanStack/query/blob/main/packages/query-core/src/hydration.ts#L102)
7​
8A serializable snapshot of a `QueryClient`'s cache, as produced by `dehydrate` and consumed by `hydrate`. Typically
9transported from server to client (e.g. embedded in server-rendered markup) to seed the client's cache with data
10that has already been fetched, avoiding a redundant fetch on the client.
11​
12## Properties
13​
14| Property | Type | Description |
15| ------ | ------ | ------ |
16| <a id="property-mutations"></a> `mutations` | `DehydratedMutation`[] | The dehydrated mutations, by default only the paused ones. |
17| <a id="property-queries"></a> `queries` | `DehydratedQuery`[] | The dehydrated queries, by default only the successful ones. |