Skip to content

@statesync/zustand


@statesync/zustand

@statesync/zustand — Zustand adapter for the state-sync revision-based synchronization engine.

This package provides a createZustandSnapshotApplier factory that creates a SnapshotApplier capable of applying incoming snapshots directly into a Zustand store via setState.

Example

ts
import { create } from 'zustand';
import { createZustandSnapshotApplier } from '@statesync/zustand';

const useStore = create<{ name: string; email: string }>(() => ({
  name: '',
  email: '',
}));

const applier = createZustandSnapshotApplier(useStore);

Interfaces

Type Aliases

Functions

Released under the MIT License.