hydrate
adds a previously dehydrated state into a cache
. If the queries included in dehydration already exist in the cache, hydrate
does not overwrite them.
import { hydrate } from 'react-query/hydration'hydrate(cache, dehydratedState, options)
Options
cache: QueryCache
cache
to hydrate the state intodehydratedState: DehydratedState
options: HydrateOptions
defaultOptions: QueryOptions
The latest TanStack news, articles, and resources, sent to your inbox.