Introduction to statecharts
summary
Demo builds a working drag‑and‑drop using xstate and React and the sandboxed code is linked, not just abstract theory. It uses the useMachine hook, context for pointer x/y and dx/dy, assign actions to update positions, a small CSS fix to make movement visible, nested states to lock axis with Shift, and connects the machine to the visualizer so state transitions are inspectable. Everything runs live in the demo with statecharts actually steering behavior.
AI-written summary · about
chapters (10)
- 0:00Start
- 7:16Mouse Move
- 7:42Actions
- 14:09Css Variables
- 20:52Shift Events
- 22:37Add an Event Listener
- 26:05What Is the Difference between State Charts and State Machines
- 26:41Parallel States
- 34:10Reason for State Charts
- 40:08New Visualizer
related talks
19mIntroducing state machines and statecharts
37mReactive State Machines and Statecharts
31mXState: the Visual Future of State Management
01h 01mThe visual future of reactive applications with statecharts
18mBuilding an accessible Slider component using State Machines
22mMake legacy code delightful with statecharts
28msetState Machine
42mTackle React component complexity using Reactive Statecharts
