xstate Documentation
XState state machine documentation. Use for state machines, statecharts, actors, transitions, guards, context, React/Vue/Svelte integrations, and Stately Studio.
Quick Reference
| Task | Entry Point |
|------|-------------|
| Getting started | contents/quick-start.mdx, contents/installation.mdx |
| Machines and states | contents/machines.mdx, contents/states.mdx, contents/transitions.mdx |
| Actors | contents/actors.mdx, contents/invoke.mdx, contents/spawn.mdx |
| Actions and guards | contents/actions.mdx, contents/guards.mdx |
| TypeScript | contents/typescript.mdx, contents/setup.mdx |
| Framework bindings | contents/xstate-react.mdx, contents/xstate-vue.mdx, contents/xstate-svelte.mdx |
| Store library | contents/xstate-store.mdx, contents/xstate-store/ |
| v4 to v5 migration | contents/migration.mdx |
| Stately Studio | contents/studio.mdx |
When to use
Use this skill when the user asks about:
- XState state machines, statecharts, states, and transitions
- Actors, invoke, spawn, context, input/output, guards, and actions
- XState with React, Vue, or Svelte, and
@xstate/store - Testing, TypeScript setup, and migrating from XState v4 to v5
- Stately Studio editor, sharing, import/export, and AI generation
How to find information
- First, read
TOC.mdfor complete file listing organized by directory - Identify relevant section based on user's question
- Read specific files for details
TOC.md contains all files organized by directory - always check it first.