Skip to content

@statesync/pinia


@statesync/pinia / createPiniaSnapshotApplier

Function: createPiniaSnapshotApplier()

ts
function createPiniaSnapshotApplier<State, Data>(store, options): SnapshotApplier<Data>;

Defined in: pinia.ts:119

Creates a SnapshotApplier that applies snapshots into a Pinia store.

This is a framework adapter: it only focuses on how to apply a snapshot into a concrete state container. It does not fetch snapshots and does not listen to invalidation events.

Type Parameters

Type ParameterDefault type
State extends Record<string, unknown>-
DataState

Parameters

ParameterType
storePiniaStoreLike<State>
optionsPiniaSnapshotApplierOptions<State, Data>

Returns

SnapshotApplier<Data>

Released under the MIT License.