XState
State machines and statecharts for JavaScript and TypeScript.
State and data fetching npm MIT
How XState is used
XState is a dependency in 10 of the 6,208 public GitHub projects set up for AI coding agents that we scanned, too few to describe it from them alone. Our scan also samples projects by dependency (Solana 2,661, Ethereum and EVM 1,496, 3D and games 2,818, agent frameworks and SDKs 10,983); counting those, it appears in 22 projects, and what it is used with below comes from all of them. Projects that use it most often also use React (77.3%), TypeScript (100.0%), ESLint (81.8%).
XState popularity over time
Gid Score 58: downloads 74, use in agent projects 29, GitHub stars 68, downloads trend 52 (each 0-100). How it is calculated.
Often used with XState
| React | 77.3% of XState projects · 2.4× more than average |
|---|---|
| TypeScript | 100.0% of XState projects · 1.8× more than average |
| ESLint | 81.8% of XState projects · 2.2× more than average |
| Testing Library | 40.9% of XState projects · 4.0× more than average |
| Sonner | 36.4% of XState projects · 3.9× more than average |
| Tailwind Merge | 50.0% of XState projects · 2.7× more than average |
| dotenv | 45.5% of XState projects · 2.9× more than average |
| Vitest | 50.0% of XState projects · 2.4× more than average |
From all 22 projects in our scan that use XState, including the dependency samples.
By coding agent
| Claude Code | 0.2% of projects set up for it |
|---|---|
| GitHub Copilot | 0.2% of projects set up for it |
Share of public repos configured for each agent that list XState as a dependency.
How XState is funded
Open Collective: XState
| Received, last 12 months | $1,335 Oct 2025 – Sep 2026 |
|---|---|
| Estimated annual budget | $2,462 Open Collective's estimate |
| Balance | $24,982 |
| Raised since the start | $40,068 · $15,086 paid out |
| Typical month median, last 12 months | $115 · $86 over 24 months |
| Last 12 months vs the 12 before | +27% |
| Contributors, last 12 months | 11 |
Top company backers all time, 15 companies in total
| JetBrains | $9,000 since Mar 2022 |
|---|---|
| Frontend Masters | $7,540 since Feb 2020 |
| Meru Health | $5,800 since Jan 2020 |
| GatsbyJS | $4,500 since Oct 2019 |
| Webflow | $4,250 since Nov 2018 |
Oct 2021Sep 2026
Money by month, last five years. First money received in Sep 2018. The typical month is the median: one big one-off donation does not move it.
USD after payment processor fees, as Open Collective reports it; fiscal host Open Source Collective. Source
GitHub Sponsors
| @davidkpiano | 2 current sponsors |
|---|
GitHub shows how many people and companies sponsor an account, not how much they pay. Sponsors of a person back all of their work.
Ways to fund XState
GitHub Sponsors Open Collective
As the maintainers list them in FUNDING.yml on GitHub. Checked Oct 20, 2026.
Install
| Package | npm install xstate |
|---|---|
| Main stacks | TypeScript / JavaScript (13), Next.js (7), Python (1), React Native / Expo (1) |
| Example projects | remix-project-org/remix-project, sunflower-land/sunflower-land, bartstc/vite-ts-react-template, alkem-io/server, johnlindquist/script-generator |
Alternatives to XState
In our scan, none of the most used tools in State and data fetching does the same job as XState: they are add-ons, companions or tools for a different task.
More in State and data fetching: TanStack Query Zustand RxJS Pinia SWR nuqs Immer React Redux