xstate

Integrate json-render StateStore with @xstate/store atoms via StateProvider.

15.9k|859|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/vercel-labs/json-render --skill xstate-vercel-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xstate
Source: https://github.com/vercel-labs/json-render/tree/main/skills/xstate
Command: npx skills add https://github.com/vercel-labs/json-render --skill xstate-vercel-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

XState Store adapter for json-render's StateStore interface provides a drop-in bridge that connects json-render state management to a @xstate/store-backed atom, enabling unified, observable UI state across components.

Core Features & Use Cases

  • XState-backed StateStore adapter: provides a drop-in StateStore that reads/writes to an @xstate/store atom.
  • Bidirectional synchronization: keeps json-render UI state and XState state in sync via the atom.
  • Easy integration with StateProvider: wrap your app to use the shared state backend across components.
  • Use Case: integrate existing XState state machines with json-render UIs to reflect and mutate state without duplicating sources.

Quick Start

Create an @xstate/store atom, instantiate the adapter with xstateStoreStateStore, and wrap your app in StateProvider to enable json-render to read and write through the XState store.

Frequently Asked Questions about xstate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync json-render UI state with an XState store in React?

You can sync json-render UI state with XState by using a drop-in StateStore adapter backed by an @xstate/store atom. This provides bidirectional synchronization, allowing your UI components to read and mutate state directly through the shared XState backend.

What problem does an XState store adapter for json-render solve?

An XState store adapter for json-render solves state duplication by bridging json-render's StateStore interface to an @xstate/store atom. This enables unified, observable UI state across components while leveraging your existing XState state machines.

How do I integrate an @xstate/store atom with json-render's StateProvider?

Create an @xstate/store atom, instantiate the adapter using xstateStoreStateStore, and wrap your React application in StateProvider. This setup enables json-render to read and write state through the shared XState store atom.

Do I need a specific version of @xstate/store to use this json-render adapter?

Yes, you need @xstate/store version 3 or higher to use this json-render adapter. The adapter relies on the atom-based architecture of @xstate/store v3+ to provide the synchronized state backend for your React components.

Can I use existing XState state machines with json-render components without duplicating state?

Yes, you can integrate existing XState state machines with json-render UIs without duplicating state sources. The adapter exports a StateStore that reads and writes directly to the @xstate/store atom, keeping everything synchronized.