# Webinar: State Machines and Actors with XState v5

> For agents: start with the [agent guide](https://ratstack.sh/llms.txt). Every page is Markdown by default; add `Accept: text/html` for HTML.

[Stately](https://www.youtube.com/@Statelyai) · Published 2024-05-03 · 2:42:16 · B tier · XState and state machines

[Watch on YouTube](https://www.youtube.com/watch?v=1NsSHkao-q4) · [All RatTube videos](/tube)

## Summary

This webinar introduces [XState](/lore/lifecycles-are-machines) v5 through actors that hold state and receive messages. David Khourshid relates that model to familiar stores, then builds behavior by sending events rather than changing another actor's state directly.

The examples include nested states, a multi-step form, and React components that work with actors. Questions explore parent-child communication and optional actor references. The session also distinguishes [XState](/lore/lifecycles-are-machines)'s behavioral structure from [Effect](/lore/effect-basics)'s execution of side effects.

## Section notes

- [3:48](https://www.youtube.com/watch?v=1NsSHkao-q4\&t=228s): Stores provide a starting point for understanding actors with state and messages.
- [28:46](https://www.youtube.com/watch?v=1NsSHkao-q4\&t=1726s): Effect handles effectful work while XState supplies overall structure.
- [56:32](https://www.youtube.com/watch?v=1NsSHkao-q4\&t=3392s): Nested states organize loading and ready behavior.
- [1:26:58](https://www.youtube.com/watch?v=1NsSHkao-q4\&t=5218s): Sending events is the usual way to request changes in an actor.
- [1:57:10](https://www.youtube.com/watch?v=1NsSHkao-q4\&t=7030s): The form demonstration follows several steps and possible outcomes.
- [2:26:16](https://www.youtube.com/watch?v=1NsSHkao-q4\&t=8776s): A component example considers an optional actor reference.

## Key concepts

- [XState](/lore/lifecycles-are-machines)
- [Effect](/lore/effect-basics)

## Our take

A long Stately webinar that builds a real app with XState v5: actors and machines, inspecting and visualizing logic, framework integration and TypeScript tips. This stack pins an XState 6 beta, so treat the API details as v5.

## Related videos

- [Effective State Machines with XState | David Khourshid | Effect Miami 2](/tube/effective-state-machines-with-xstate-david)
- [Effective state machines for complex logic by David Khourshid (Effect Days 2024)](/tube/effective-state-machines-for-complex-logic)
- [David Khourshid: Simplifying Complex UIs with Finite Automata & Statecharts | JSConf Iceland 2018](/tube/simplifying-complex-uis-with-statecharts)
- [Production-Grade TypeScript by Johannes Schickling (Effect Days 2024)](/tube/production-grade-typescript-by-johannes-schickling)

Summary based on the transcript. Written 2026-11-15.
