---
id: vercel-labs/json-render/xstate
version: "dc3c926f"
license: Apache-2.0
install: manual
updated: 2026-07-08
---
# xstate — This adapter bridges XState Store atoms into json-render's StateStore interface, letting you manage application state through @xstate/store. Pass an atom to the adapter and wrap your json-render components with the resulting store provider.
Publisher: vercel-labs · Stars: 15776 · Updated: 2026-07-08
Install (manual): `git clone https://github.com/vercel-labs/json-render`
## SKILL.md
# @json-render/xstate
[XState Store](https://stately.ai/docs/xstate-store) adapter for json-render's `StateStore` interface. Wire an `@xstate/store` atom as the state backend for json-render.
## Installation
```bash
npm install @json-render/xstate @json-render/core @json-render/react @xstate/store
```
Requires `@xstate/store` v3+.
## Usage
```tsx
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
{/* json-render reads/writes go through @xstate/store */}
```
## API
### `xstateStoreStateStore(options)`
Creates a `StateStore` backed by an `@xstate/store` atom.
| Option | Type | Required | Description |
|--------|------|----------|-------------|
| `atom` | `Atom` | Yes | An `@xstate/store` atom (from `createAtom`) holding the json-render state model |
[View on SkillFed](https://skillfed.io/vercel-labs/json-render/xstate) · [View on GitHub](https://github.com/vercel-labs/json-render)