Guest Laura Kalbeg discusses the growth of XState project, introduces Stately.ai for seamless state management solutions compatible with various tools like XState, Redux & zustand.
Stately now allows you to deploy state machines as live actors using Cloudflare's Edge Workers, enabling real-time interaction and multiplayer functionality without coding.
Stately empowers developers to perform model-based testing, generating test paths based on models and supporting popular testing libraries, improving predictability and application quality.
Using xstate and Stately simplifies development and improves collaboration by providing a clean, decoupled approach to writing code, accessible to non-technical creators, and accelerating development with AI assistance.
Deep dives
Deploying State Machines as Live Actors
Stately now allows you to deploy your state machines as live actors using Cloudflare's Edge Workers via Partykit. With a simple button click, you can grab an API key and a URL for your actor and have it running live. The deployment process is seamless and does not require any coding. This feature enables you to interact with your state machines in real-time and also supports multiplayer functionality.
Model-Based Testing with State Machines
Stately empowers developers to perform model-based testing with their state machines. You can generate test paths based on your models and choose between generating all possible paths or just happy paths. Stately Studio provides code generation for testing frameworks and supports popular testing libraries like Playwright for implementation. This feature ensures that you test the right things and improves the predictability and quality of your applications.
Simplifying Development with xstate and Stately
By using xstate and Stately, developers can simplify their development process and improve collaboration. State machines provide a clean and decoupled approach to writing code, allowing stakeholders from various backgrounds to come together and clearly define app logic and behaviors. The visual nature of state machines in Stately Studio makes it accessible to non-technical creators as well. Additionally, the AI assistance provided by Stately Studio helps accelerate development by generating code snippets, prototyping UI, and assisting with state machine design.
The benefits of using state machines
State machines, specifically X-State, are effective in solving complex problems. They are valuable for managing complex state and logic relationships between nodes. State machines can range from small to large and can be mixed with non-state machine logic. They provide a consistent way to represent and visualize logic, making it easier to understand and communicate.
The actor model and its use in state machines
The actor model is a way to break down state machines into smaller modules that send events to each other and trigger behavior based on those events. It allows for long-running processes and provides a way to decouple logic into smaller pieces. X-State version 5 introduces the concept of actors and makes it easier to understand and work with state machines. The actor model promotes modularity and breaks down behavior into smaller, manageable components.
Amal, Nick & special guest Laura Kalbeg geek out over the remarkable growth and evolution of the XState project and its team in recent years. Laura also tells everyone about Stately.ai, a SaaS platform that uses AI to create seamless state management solutions compatible with various tools like XState, Redux & zustand.
Fastly – Our bandwidth partner. Fastly powers fast, secure, and scalable digital experiences. Move beyond your content delivery network to their powerful edge cloud platform. Learn more at fastly.com
Fly.io – The home of Changelog.com — Deploy your apps and databases close to your users. In minutes you can run your Ruby, Go, Node, Deno, Python, or Elixir app (and databases!) all over the world. No ops required. Learn more at fly.io/changelog and check out the speedrun in their docs.