This adapter bridges json-render's state management with XState Store, letting you use an @xstate/store atom as your backend instead of json-render's default state system. You create an atom with createAtom, wrap it with xstateStoreStateStore, and pass it to StateProvider. The main reason you'd reach for this is if you're already using XState for state machines elsewhere in your app and want consistent state management across both your declarative JSON UI and your regular components. It's a clean integration point, though you'll need to weigh whether the added dependency is worth it versus just using json-render's built-in state unless you really need XState's features.

skills.sh installs
1.1K
GitHub stars
19.5K
last updated
Aug 21, 2026

Install

$ npx -y skills add vercel-labs/json-render --skill xstate --agent claude-code

Installs into .claude/skills of the current project.

Files

@json-render/xstate

XState Store adapter for json-render's StateStore interface. Wire an @xstate/store atom as the state backend for json-render.

Installation

npm install @json-render/xstate @json-render/core @json-render/react @xstate/store

Requires @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>

API

xstateStoreStateStore(options)

Creates a StateStore backed by an @xstate/store atom.

OptionTypeRequiredDescription
atomAtom<StateModel>YesAn @xstate/store atom (from createAtom) holding the json-render state model

Sponsors

Details

Repository
github.com/vercel-labs/json-render
Category
Cloud & Infrastructure
First seen
Jun 3, 2026

More from vercel-labs/json-render

All 31
1vercel-labs avatarsolidvercel-labs/json-renderSolidJS renderer for json-render. Use when building @json-render/solid catalogs/registries, wiring Renderer providers, implementing bindings/actions, or trouble1.1Kskills.sh installs
2microsoft avatarmarkdown-token-optimizermicrosoft/github-copilot-for-azureAnalyzes markdown files for token efficiency. TRIGGERS: optimize markdown, reduce tokens, token count, token bloat, too many tokens, make concise, shrink file, 1.1Kskills.sh installs
3vercel-labs avataryamlvercel-labs/json-renderYAML wire format for json-render with streaming parser, prompt generation, and AI SDK transform. Use when working with @json-render/yaml, YAML-based spec stream1.1Kskills.sh installs
4railwayapp avatardeploymentrailwayapp/railway-skillsThis skill should be used when the user wants to manage Railway deployments, view logs, or debug issues. Covers deployment lifecycle (remove, stop, redeploy, re1Kskills.sh installs
5microsoft avatarmarkdown-token-optimizermicrosoft/azure-skillsmarkdown token optimizer1Kskills.sh installs
6microsoft avatarsenseimicrosoft/github-copilot-for-azure**WORKFLOW SKILL** — Iteratively improve skill frontmatter compliance using the Ralph loop pattern. WHEN: \"run sensei\", \"sensei help\", \"improve skill\", \"1Kskills.sh installs