XState + json-render: управление состоянием UI

★ 8.1 · vibe-coding

Управление состоянием через XState is a Claude Code skill that wires @xstate/store as the state backend for json-render via a StateStore adapter. Reach for it when you're rendering UI from JSON schemas with json-render and want XState Store to own the state instead of json-render's built-in storage — or when your React project already uses @xstate/store and you want json-render to read from and write to the same atom without duplicating state logic. The core of the skill is the xstateStoreStateStore function: pass it an atom created with createAtom from @xstate/store, and it returns a StateStore-compatible object ready to drop into json-render's StateProvider. Install via npm — requires @json-render/xstate, @json-render/core, @json-render/react, and @xstate/store v3 or higher. The direction here is bridging an existing XState atom into json-render, not replacing XState or running json-render without an external store. Works well in React projects where json-render handles declarative rendering and XState handles state; not suitable if @xstate/store is below v3 or if json-render is not part of the stack.