Stately core concepts
Learn about states, transitions, events, actions, and actors in the Stately Studio.
Introducing states
A state describes the machine’s status or mode, which could be as simple as Paused and Playing. A state machine can only be in one state at a time.
Initial states
When a state machine starts, it enters the initial state first. A machine can only have one top-level initial state; if there were multiple initial states, the machine wouldn’t know where to start!
Final states
When a machine reaches the final state, it can no longer receive any events, and anything running inside it is canceled and cleaned up. The box with a surrounding border icon represents the final state.
Parent states
States can contain more states, also known as child states. These child states are only active when the parent state is active.
Parallel states
A parallel state is a state separated into multiple regions of child states, where each region is active simultaneously.
History states
A history state returns the parent state to its most recently active child state. The box with an H inside represents the history state.
Transitions and events
8 pages.
Actions and actors
2 pages.