Skip to content

@pinia/root / pinia / skipHydrate

skipHydrate()

ts
function skipHydrate<T>(obj): T

Tells Pinia to skip the hydration process of a given object. This is useful in setup stores (only) when you return a stateful object in the store but it isn't really state. e.g. returning a router instance in a setup store.

Type Parameters

T = any

Parameters

obj: T

target object

Returns

T

obj

Released under the MIT License.