xstate

Adapt @xstate/store atoms to json-render's StateStore interface.

Updated Jun 24, 2026
One-click install
npx skills add https://github.com/hasna/render --skill xstate-hasna
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xstate
Source: https://github.com/hasna/render/tree/main/skills/xstate
Command: npx skills add https://github.com/hasna/render --skill xstate-hasna

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the need to build custom state adapters for teams that already use @xstate/store for state management in their json-render generative UI projects, bridging the gap between XState's state logic and json-render's rendering pipeline.

Core Features & Use Cases

  • Drop-in XState Adapter: Provides a pre-built, type-safe StateStore implementation that natively supports @xstate/store atoms, requiring no custom synchronization code.
  • Cross-Platform Compatibility: Works with all json-render supported platforms including React, React Native, and terminal UIs that use XState for state management.
  • Use Case: If your team already uses XState to manage complex UI state like filter selections, authentication status, or pagination for a json-render powered dashboard, this adapter lets you plug your existing XState atom directly into json-render's StateProvider.

Quick Start

Use the xstate skill to connect your existing @xstate/store atom to json-render's StateProvider to manage state for your generative UI components without writing custom adapter code.

Frequently Asked Questions about xstate

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

FAQPage Schema
How do I connect an XState store to json-render for generative UI?

You connect XState to json-render by plugging your existing @xstate/store atom into a pre-built, type-safe StateStore adapter, eliminating the need to write manual synchronization code for your generative UI components.

Do I need to write a custom state adapter to use XState with json-render?

No, you do not need a custom state adapter. This provides a drop-in, type-safe StateStore implementation that natively supports @xstate/store atoms for json-render, bridging state logic and the rendering pipeline automatically.

Can I use XState state management with json-render in React Native?

Yes, XState state management works with json-render in React Native. The adapter is cross-platform compatible, supporting React, React Native, and terminal UIs that rely on @xstate/store for complex UI state.

What is the best way to manage complex UI state like authentication in json-render?

The best way to manage complex UI state in json-render is using XState atoms for logic like authentication or pagination, connected directly via a type-safe StateStore adapter to avoid manual synchronization code.

Why does my json-render StateProvider not sync with my XState atom?

Your json-render StateProvider may not sync with your XState atom without a proper StateStore adapter. Mapping @xstate/store atom state directly to the expected state model requires a dedicated adapter to function correctly.