
xstate
★ 15,600by vercel · part of vercel-labs/json-render
XState Store adapter for json-render's StateStore interface. Use when integrating json-render with @xstate/store for state management via @json-render/xstate.
🔥🔥✓ VerifiedFreeQuick setup
🧰 Not standalone. This skill ships with vercel-labs/json-render and only works together with that tool — install the tool first, then add this skill.
This is the playbook your agent receives when the skill activates — you don't need to read it to use the skill, but it's here to audit before installing.
name: xstate description: XState Store adapter for json-render's StateStore interface. Use when integrating json-render with @xstate/store for state management via @json-render/xstate.
@json-render/xstate
XState Store adapter for json-render's StateStore interface. Wire an @xstate/store atom as the state backend for json-render.
API
xstateStoreStateStore(options)
Creates a StateStore backed by an @xstate/store atom.
| Option | Type | Required | Description |
|---|---|---|---|
atom | Atom<StateModel> | Yes | An @xstate/store atom (from createAtom) holding the json-render state model |
Copy & paste — that's it
npm install @json-render/xstate @json-render/core @json-render/react @xstate/storeRun this in your project — your agent picks the skill up automatically.
Installation
npm install @json-render/xstate @json-render/core @json-render/react @xstate/storeRequires @xstate/store v3+.
Usage
import { createAtom } from "@xstate/store";
import { xstateStoreStateStore } from "@json-render/xstate";
import { StateProvider } from "@json-render/react";
// 1. Create an atom
const uiAtom = createAtom({ count: 0 });
// 2. Create the json-render StateStore adapter
const store = xstateStoreStateStore({ atom: uiAtom });
// 3. Use it
<StateProvider store={store}>
{/* json-render reads/writes go through @xstate/store */}
</StateProvider>No common issues documented yet. If you hit a problem, the repository's GitHub Issues page is the best place to look.