Apr 19, 2026 — 11 min — Systems Notes
XState, Actors, and What the Stately Argument Actually Buys
Why a hand-rolled retry double-charged a Stripe customer because the cancel state was implicit, and what XState 5's setup-plus-actors model gives you that useReducer does not.
Outcome: Reader can write an XState 5 machine using the setup pattern, distinguish invoked from spawned actors, decide when to graduate from useReducer to a state machine library, and read XState code as a structured argument rather than a configuration object.