@tinystack/machine
Interactive demos showcasing the power of state machines
~1KB gzipped • Type-safe • XState v5-inspired
Async Search (Race Conditions)
The classic bug everyone has shipped. Type quickly and watch stale responses get rejected.
GuardsRace ConditionsDebounceRequest ID
Session Timeout
Idle detection with warning countdown. Stop moving your mouse and watch it happen.
TimersEntry/Exit ActionsActivity Tracking
Multi-Step Form
A wizard that prevents invalid navigation and manages complex step progression with guards.
StatesTransitionsGuardsContext
Async Data Fetch
Shows how state machines prevent impossible states like 'loading AND error' simultaneously.
StatesActionsContextImpossible States
Toggle with Confirmation
Even a simple toggle can have hidden complexity when you add confirmation dialogs.
StatesTransitionsEntry Actions
Learn more at github.com/RicSala/machine