Back to gallery
statelyai/xstate on GitHub — State machines, statecharts, and actors for complex logic
statelyai
Built bystatelyai/

xstate

State machines, statecharts, and actors for complex logic

Stars
30.1k
Forks
1.4k
Watchers
0
Open issues
91
TypeScriptMIT main Updated 2 months ago~7 stars/day lifetime
Editor's take

Actor-based state machines. ~27k stars. Overkill for most apps but unbeatable for genuinely complex workflows — multi-step forms, async retries with rollback, real-time collaboration. Worth learning even if you do not adopt.

Use this if

You have a genuinely complex workflow with many states, transitions, and side effects.

Skip if

You have toggles and modals — useState is enough.

State Management
Topics
state-machinestatechartinterpretervisualizerscxmlstatestate-managementworkfloworchestrationfinite-state-machinefsmjavascriptstatechartstypescriptbackground-jobsactor-modelreactivestate-machinesxstate
Quick install
# Install via npm / pnpm / bun:
pnpm add xstate
# or
npm install xstate

Inferred from TypeScript · always double-check against the official README below.

Live data via GitHub REST API · Cached 30 min · Created 14 Sept 2015