Skip to content

@statesync/jotai


@statesync/jotai

@statesync/jotai — Jotai adapter for the state-sync revision-based synchronization engine.

This package provides a createJotaiSnapshotApplier factory that creates a SnapshotApplier capable of applying incoming snapshots into a Jotai atom via a Jotai store.

Example

ts
import { atom, createStore } from 'jotai/vanilla';
import { createJotaiSnapshotApplier } from '@statesync/jotai';

const store = createStore();
const profileAtom = atom({ name: '', email: '' });
const applier = createJotaiSnapshotApplier(store, profileAtom);

Interfaces

Type Aliases

Functions

Released under the MIT License.