State machines for frontend state management
summary
Demonstrates that finite state machines replace tangled ifs by exposing the actual transitions: a 2D side‑scroller input model and a dashboard filter system (6 buttons -> 31 states if modeled naively) get refactored into explicit states and guards. Implements a tiny custom interpreter plus examples using XState, yields a time‑travel logger and simpler debugging, reuses actions across states, and shows the approach working end‑to‑end on DOM-driven examples.
AI-written summary · about
chapters (7)
related talks
45mState of the Art User Interfaces with State Machines
25mMastering UIs with Finite State Machines
38mState of the Art Web User Interfaces with State Machines
38mInto the Visual World of State Machines
20mSetState, We Need to Talk!
16mMake Impossible States Unreachable in Your Frontends
27mXState: the Visual Future of State Management
37mReactive State Machines and Statecharts
