TanStack
API Reference

defaultShouldDehydrateQuery

ts
function defaultShouldDehydrateQuery(query: Query): boolean;

Defined in: packages/query-core/src/hydration.ts:213

The default shouldDehydrateQuery predicate used by dehydrate. Only dehydrates queries whose status is 'success'.

Parameters

query

Query

The query to check.

Returns

boolean

true if the query's status is 'success'.