@statesync/pinia
@statesync/pinia
@statesync/pinia — Pinia adapter for the state-sync revision-based synchronization engine.
This package provides a createPiniaSnapshotApplier factory that creates a SnapshotApplier capable of applying incoming snapshots directly into a Pinia store via $patch.
Example
ts
import { defineStore } from 'pinia';
import { createPiniaSnapshotApplier } from '@statesync/pinia';
const useUserStore = defineStore('user', {
state: () => ({ name: '', email: '' }),
});
const store = useUserStore();
const applier = createPiniaSnapshotApplier(store);