XState
Hacker ApprovedShares rank 3 of 6 state management libraries by recommenders
Recommended for building state machines and statecharts in JavaScript and TypeScript, with a visualizer and simulator that people praise; critics find its syntax verbose and hard to learn.
Recommended for building state machines and statecharts in JavaScript and TypeScript, with a visualizer and simulator that people praise; critics find its syntax verbose and hard to learn.
15 people gave an opinion
- recommend it
- 12
- criticize it
- 3
- approval share
- 80%
Recommended in 4 of 13 months
- November 2025: not recommended
- December 2025: recommended
- January 2026: not recommended
- February 2026: recommended
- March 2026: recommended
- April 2026: recommended
- May 2026: not recommended
- June 2026: not recommended
- July 2026: not recommended
- August 2026: not recommended
- September 2026: not recommended
- October 2026: not recommended
- November 2026: not recommended (month in progress)
Why it carries the badge
- 12 people recommend itNeeds 10 or more, met.
- 4 recommenders for every criticNeeds 2 to 1 or better, met.
- Recommended in 4 of 13 monthsNeeds 4 or more, met.
The same three rules apply to every product, and the badge can’t be bought. How the badge works
What people say about it
The reasons people give, with the number of comments that give each one. Open a reason to read what they said.
Why people recommend it
Each mark is one comment
Handles complex state logic well
“XState is awesome, made a complex decentralized key sharing scheme a breeze.”
Comment from 26 Apr 2026 in “Statecharts: hierarchical state machines” “Xstate has helped me clean up some hairy situations in the past”
Comment from 26 Apr 2026 in “Statecharts: hierarchical state machines” “I can't even think how horrible it'd have been without XState.”
Comment from 26 Apr 2026 in “Statecharts: hierarchical state machines” - Comment from 27 Apr 2026 in “Statecharts: hierarchical state machines”
Well-designed, intuitive API
“Think Xstate machines are a little more intuitive than the conditional value structuring displayed here”
Comment from 24 Mar 2026 in “No-build, no-NPM, SSR-first JavaScript framework if you hate React, love HTML” “It's a really well-designed API.”
Comment from 9 Feb 2026 in “Show HN: Browser based state machine simulator and visualizer” Treats statecharts as executable behavior
“statecharts are most valuable when they're treated as executable behavior, not just documentation.”
Comment from 26 Apr 2026 in “Statecharts: hierarchical state machines” “state machines are the truth!”
Comment from 4 Mar 2026 in “Show HN: Gapless.js – gapless web audio playback” Widely praised as excellent library
“bring such a powerful concept to the world”
Comment from 26 Apr 2026 in “Statecharts: hierarchical state machines” “XState is an excellent option.”
Comment from 10 Mar 2026 on Hacker News “XState is an awesome library!”
Comment from 26 Apr 2026 in “Statecharts: hierarchical state machines”
What people warn about
Each mark is one comment
Verbose, complex syntax to learn
“libraries like xstate are far more difficult to learn the syntax and are more verbose”
Comment from 26 Apr 2026 in “Statecharts: hierarchical state machines” “the accidental complexity of how we worked with xstate”
Comment from 26 Apr 2026 in “Statecharts: hierarchical state machines” Overkill unless nested state is needed
“if you don't need complex nested state machines, you should check out robot3.js”
Comment from 26 Apr 2026 in “Statecharts: hierarchical state machines” Hard to retrofit into existing systems
“they were hard to retrofit to existing systems”
Comment from 26 Apr 2026 in “Statecharts: hierarchical state machines”
Other state management libraries people recommend
The four most recommended other state management libraries, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.
| Product | Recommend | Criticize | Approval | Months | Owned | Badge |
|---|---|---|---|---|---|---|
| TanStack Query | 19 | 2 | 90% | 9 | — | Approved |
| Redux | 15 | 30 | 33% | 8 | — | — |
| XStateThis page | 12 | 3 | 80% | 4 | — | Approved |
| Zustand | 12 | 3 | 80% | 6 | — | Approved |
| MobX | 7 | 1 | 88% | 6 | — | — |
What people said
18 of the 19 comments that mention it, newest first. Each links to the original comment.
“It has solved so many problems in quite a few codebases for me”
“XState is awesome, made a complex decentralized key sharing scheme a breeze.”
“if you don't need complex nested state machines, you should check out robot3.js”
“bring such a powerful concept to the world”
“Xstate has helped me clean up some hairy situations in the past”
“the accidental complexity of how we worked with xstate”
“XState is an awesome library!”
“they were hard to retrofit to existing systems”
“I can't even think how horrible it'd have been without XState.”
“The next version of XState will be much more ergonomic, with a reduced API surface area, lower learning curve”
“XState has over 4 million weekly npm downloads”
“statecharts are most valuable when they're treated as executable behavior, not just documentation.”
“libraries like xstate are far more difficult to learn the syntax and are more verbose”
“Think Xstate machines are a little more intuitive than the conditional value structuring displayed here”
“XState is an excellent option.”
“state machines are the truth!”
“It's a really well-designed API.”
“which has a beautiful visualizer/simulator”
Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.