Elestia Open Source Ratings
7.3

XState

A strong pick. 7th of 10 state and data fetching.

XState is a framework-agnostic library of state machines, statecharts and actors. It is the strongest tool in this category for complex, multi-step logic, but it is too heavy for everyday app state and does not fetch server data. v5 is stable and actively maintained. A v6 alpha with breaking changes is already published, so plan for another migration.

Best for: Teams with complex, long-lived flows (wizards, checkout, media players, agent loops) that want those flows explicit, typed, visual and testable.

WebsiteGitHubnpm

Scores

Overall7.3

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 6.5, likely 5.5 to 7.5

For complex flows, it is clearly the best tool in the category and well maintained, which supports a strong pick for that kind of project. For most apps, Zustand, Jotai or TanStack Query do this category's job more simply. Its below-median growth and the coming v6 breaking changes also keep it out of the 7-8 range for general use.

GPT-6.2 Sol: 8.1, likely 7.0 to 9.1

XState v5 is a strong choice when an app needs explicit rules for what can happen in each state and when asynchronous work starts or stops. Zustand is easier for simple shared state, and TanStack Query handles server-data freshness with less application code. Active maintenance supports a new adoption today, with slower relative download growth and future major-version migration costs tempering the recommendation.

Needed by many4.5

How many developers need a tool for this job?

Claude Opus 5.5: 4.5, likely 3.5 to 5.5

Most apps need state management, but XState's job is a narrower one: complex event-driven logic. Users and reviewers agree that most projects can use simpler stores. It does not cover server-data fetching. Running on any framework and on the server widens it a little.

GPT-6.2 Sol: 4.4, likely 3.3 to 5.6

XState runs across frameworks and on both the client and server. Its strongest fit is the subset of apps with branching workflows, concurrent steps, or strict transition rules. The React survey helps establish how common simpler approaches are, while the share of projects that need statecharts remains uncertain.

Helps a lot7.8

How well does it do the job for those who need it?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

Within its niche it is the most complete tool: hierarchical and parallel states, actors, persistence, strong TypeScript inference without typegen in v5, and visual tooling. Users report steep learning, verbose code, weak inference when code is split into files, and unreliable AI-generated code because v4 and v5 syntax get mixed. For ordinary app state, Zustand or Jotai do the job with far less code.

GPT-6.2 Sol: 8.5, likely 7.4 to 9.4

Stable v5 combines guarded transitions, nested and parallel states, typed actors, and documented testing and inspection. Users report that explicit transitions make complex flows easier to reason about, while machine definitions add work for simple state. Coding agents can mix v4 and v5 syntax, and routine server caching is easier with TanStack Query. Available speed comparisons cover narrow workloads, so the performance judgment depends on the app.

Holds up over time7.5

Will it still be a good choice in two years?

Claude Opus 5.5: 7.0, likely 5.5 to 8.0

Activity is high: 649 commits and 208 monorepo releases in the last year, only 35 open issues, and a company (Stately) behind it with long-time core maintainers. The risk is churn: a v6 alpha is out that removes core exports and makes v5 snapshots incompatible, so a second big migration in a few years is coming. The company's commercial future and attention to AI agents add some uncertainty.

  • github commitsLastYear / releasesLastYear: 649 commits and 208 releases in the last year.
  • github openIssues / closedIssues: 35 open against 1424 closed.
  • stately.ai/docs/xstate/v6/xstate-v5-to-v6: v6 drops assign/sendTo and has incompatible snapshots; v5 and v6 must be treated as separate libraries.
  • stately.ai/docs/xstate/v6/faq: v6 is in alpha; v5 remains the stable choice.

GPT-6.2 Sol: 8.0, likely 6.8 to 9.0

XState published 21 npm versions in the past year, and an outside contributor’s TypeScript fix shipped four days after merge. Stately continues to support v5 while developing v6, and Sanity publicly funds XState. The pace of issue resolution across the project is harder to gauge, and the v6 beta introduces API and snapshot migration work.

Used widely6.3

How many use it, and is that growing?

Claude Opus 5.5: 6.0, likely 5.0 to 7.0

33M downloads in four weeks, up 3.2x from a year ago, puts it close to Jotai, Pinia and Apollo. It is far behind Zustand and TanStack Query, and its growth is below the 4.1 median, so it is losing share. Its 107k dependent repos are high, second only to Redux Toolkit, which shows broad real use, though some of that comes through other tools that depend on it.

  • npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 33.0M against 10.3M, a ratio of 3.2, below the 4.1 median.
  • dependents repos: 107,428 dependent repos, more than every peer except Redux Toolkit.
  • github stars: 30.5k stars.
  • bluesky posts: Only 4 posts, low attention compared with peers.

GPT-6.2 Sol: 6.6, likely 5.3 to 7.8

Ecosyste.ms found about 107,000 dependent repositories, second to Redux Toolkit among the supplied peers. Four-week downloads climbed from 10.3 million to 33.0 million, or 3.22×, below the 4.10× catalog median and well behind Zustand and TanStack Query. Automated and indirect installs blur the count of teams choosing XState, and social signals are sparse.

  • dependents repos and packages: 107,428 repositories and 835 packages in a partial index
  • npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, and medianDownloadsRatio: 3.22× year-over-year growth against the 4.10× baseline
  • peers: Second in indexed repositories, with slower download growth than the leading peers
  • github stars, bluesky posts, and hackerNews top: 30,523 repository-wide stars and limited recent discussion, including a separate XState Store story
  • npmjs.com/package/xstate?activeTab=code: Related packages can bring in XState through peer dependencies
Vouched for6.6

Who stands behind it being good?

Claude Opus 5.5: 6.0, likely 4.5 to 7.0

It is the best-known statecharts library in JavaScript, with many independent write-ups by developers who use it in production, and peers such as TkDodo have written about XState Store. I found no current survey satisfaction data, and recent independent reviews are few. Several of them say it is good but only for complex cases.

GPT-6.2 Sol: 7.1, likely 5.9 to 8.3

A 2026 payments write-up describes using v5 to handle payment states, and Sanity’s Vercel dashboard plugin records an upgrade to v5. Kaltura’s account of concurrent media uploads adds an older production example, and Sanity also backs the library financially. The State of React survey covers XState and identifies Zustand as the satisfaction leader, so the strongest endorsements are still for specific workflows.

Safe8.6

How safe is it to depend on?

Claude Opus 5.5: 8.5, likely 7.5 to 9.5

It has zero runtime dependencies, no advisories ever recorded, an MIT licence and an OpenSSF Scorecard of 7.3. Weak checks are Code-Review (5), Security-Policy (0), Fuzzing and CII (0). It has no known supply-chain incidents.

  • npm dependencies: 0 dependencies.
  • advisories total: 0 advisories.
  • scorecard score: 7.3; weak on code review, security policy and fuzzing.
  • npm license: MIT.

GPT-6.2 Sol: 8.6, likely 7.4 to 9.5

The MIT-licensed core has zero runtime dependencies and no advisories in the supplied OSV record. The tagged GitHub Actions workflow uses npm trusted publishing, and npm lists two human collaborators and a release bot. The 7.3 Scorecard shows mixed code review coverage, with no detected fuzzing or public security policy.

Good

  • It models complex flows explicitly as statecharts and actors, which makes impossible states and race conditions easier to rule out.
  • It has zero runtime dependencies, an MIT licence and no known advisories.
  • It works with any framework and on both front end and back end, with adapters for React, Vue, Svelte and Solid, and it has a visual inspector and editor.
  • It is very actively maintained by the Stately team, with hundreds of commits and frequent releases in the last year.

Bad

  • The learning curve is steep, and it is overkill for the simple UI state that most apps have.
  • The v4-to-v5 changes and the coming v6 alpha mean repeated migrations, and AI coding assistants often mix up syntax across versions.
  • It has no server-data caching or refetching, so it covers only half of this category's job.
  • Download growth (3.2x) lags the median and the leading peers (about 6.5-7x for Zustand, TanStack Query and Redux Toolkit).

The numbers

npm downloads, 4 weeks
33M ×3.2 in a year
GitHub stars
31k
Commits, 12 months
649
npm version
5.33.4 Nov 2026
Versions, 12 months
21
Advisories, 24 months
0 of 0 ever
OpenSSF Scorecard
7.3 out of 10, Nov 2026
Licence
MIT

Read on 21 November 2026 from GitHub (statelyai/xstate), npm (xstate), OSV and the OpenSSF Scorecard.

State and data fetching

  1. 9.0TanStack Query
  2. 8.5Zustand
  3. 8.0Pinia
  4. 7.6Jotai
  5. 7.6Redux Toolkit
  6. 7.5Apollo Client
  7. 7.3XState
  8. 7.0SWR
  9. 6.7MobX
  10. 6.5Valtio
Compare all 10 on six scores