Actors
Learn how to use actors and the actor model in XState and Stately Studio.
Actors
When you run a state machine, it becomes an actor: a running process that can receive events, send events and change its behavior based on the events it receives, which can cause effects outside of the actor.
Invoke
State machines can "invoke" one or many actors within a given state. The invoked actor will start when the state is entered, and stop when the state is exited. Any XState actor can be invoked, including simple Promise-based actors, or even complex machine-based actors.
Spawn
XState is based on the actor model. Spawned actors are managed by the state machine.
Systems
An actor system is a collection of actors that can communicate with each other. Actors can invoke/spawn other actors, which forms a natural hierarchy of actors that belong to the same system.
Inspection
Coming soon: inspection API