Skip to content

@statesync/pinia


@statesync/pinia / PiniaApplyMode

Type Alias: PiniaApplyMode

ts
type PiniaApplyMode = "patch" | "replace";

Defined in: pinia.ts:57

The strategy used to apply incoming snapshot data to the Pinia store.

  • 'patch' — Non-destructive shallow merge via store.$patch(partial). Existing keys not present in the snapshot are left untouched.
  • 'replace' — Full top-level replacement via a $patch mutator callback. Keys present in the store but absent from the snapshot are deleted.

Released under the MIT License.