Hacker ApprovedDepartments

XState

Hacker Approved

Shares 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%
Each figure is one person. RecommendsCriticizes

Recommended in 4 of 13 months

  1. November 2025: not recommended
  2. December 2025: recommended
  3. January 2026: not recommended
  4. February 2026: recommended
  5. March 2026: recommended
  6. April 2026: recommended
  7. May 2026: not recommended
  8. June 2026: not recommended
  9. July 2026: not recommended
  10. August 2026: not recommended
  11. September 2026: not recommended
  12. October 2026: not recommended
  13. 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”
  • 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.

XState compared with 4 alternatives
ProductRecommendCriticizeApprovalMonthsOwnedBadge
TanStack Query19290%9—Approved
Redux153033%8——
XStateThis page12380%4—Approved
Zustand12380%6—Approved
MobX7188%6——
See all 6 state management libraries, ranked

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”

RecommendsComment from 27 Apr 2026 in “Statecharts: hierarchical state machines”

“XState is awesome, made a complex decentralized key sharing scheme a breeze.”

RecommendsComment from 26 Apr 2026 in “Statecharts: hierarchical state machines”

“if you don't need complex nested state machines, you should check out robot3.js”

MixedComment from 26 Apr 2026 in “Statecharts: hierarchical state machines”

“bring such a powerful concept to the world”

RecommendsComment from 26 Apr 2026 in “Statecharts: hierarchical state machines”

“Xstate has helped me clean up some hairy situations in the past”

RecommendsComment from 26 Apr 2026 in “Statecharts: hierarchical state machines”

“the accidental complexity of how we worked with xstate”

CriticizesComment from 26 Apr 2026 in “Statecharts: hierarchical state machines”

“XState is an awesome library!”

RecommendsComment from 26 Apr 2026 in “Statecharts: hierarchical state machines”

“they were hard to retrofit to existing systems”

CriticizesComment from 26 Apr 2026 in “Statecharts: hierarchical state machines”

“I can't even think how horrible it'd have been without XState.”

RecommendsComment from 26 Apr 2026 in “Statecharts: hierarchical state machines”

“The next version of XState will be much more ergonomic, with a reduced API surface area, lower learning curve”

RecommendsComment from 26 Apr 2026 in “Statecharts: hierarchical state machines”

“XState has over 4 million weekly npm downloads”

RecommendsComment from 26 Apr 2026 in “Statecharts: hierarchical state machines”

“statecharts are most valuable when they're treated as executable behavior, not just documentation.”

RecommendsComment from 26 Apr 2026 in “Statecharts: hierarchical state machines”

“libraries like xstate are far more difficult to learn the syntax and are more verbose”

CriticizesComment from 26 Apr 2026 in “Statecharts: hierarchical state machines”

“Think Xstate machines are a little more intuitive than the conditional value structuring displayed here”

RecommendsComment from 24 Mar 2026 in “No-build, no-NPM, SSR-first JavaScript framework if you hate React, love HTML”

“XState is an excellent option.”

RecommendsComment from 10 Mar 2026 on Hacker News

“state machines are the truth!”

RecommendsComment from 4 Mar 2026 in “Show HN: Gapless.js – gapless web audio playback”

“It's a really well-designed API.”

RecommendsComment from 9 Feb 2026 in “Show HN: Browser based state machine simulator and visualizer”

“which has a beautiful visualizer/simulator”

RecommendsComment from 8 Feb 2026 in “Show HN: Browser based state machine simulator and visualizer”

Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.