Skip to content
JS

Introduction to State Machines Using XState

Course on egghead by Kyle Shevlin

View on egghead (opens in a new tab)
53 min
LengthVideo runtime
Free
Price modelListed as free
22
Lessons
4.8
Rating out of 555 ratings on egghead
Dec 2019
Published18 Dec 2019

About this course

Description from egghead

The difficulty of managing state is one of the primary reasons our applications become so complex. We try and manage this complexity with a lot of booleans, somewhat semantic variables like isLoading , wasFetched , and hasError , and over-engineered systems that are still full of bugs. Surely, there's a better way. That better way is state machines . State machines formalize how we define and transition through the states of our application and give us ultimate control of the most complex parts of our apps. In this course, we will explore the problems state machines purport to solve, like boolean explosion. We'll try to solve it our own way first, get so far, and then demonstrate how state machines get us all the way. After that, we'll dive into the XState library, JavaScript's premiere state machine library, to learn its API and how to use it to solve our problems.

What it covers

22 lessons
  1. 1Course Intro and Overview
  2. 2Eliminate Boolean Explosion by Enumerating States
  3. 3Replace Enumerated States with a State Machine
  4. 4Use an Interpreter to Instantiate a Machine
  5. 5Use XState Viz to Visually Develop and Test Your Machine
  6. 6Add Actions to Transitions to Fire Side Effects
  7. 7Trigger Actions When Entering and Exiting a XState State
  8. 8Replace Inline Functions with String Shorthands
  9. 9Use Internal Transitions in XState to Avoid State Exit and Re-Entry
  10. 10Send Events to the Machine with the XState Send Action Creator
  11. 11Track Infinite States with with XState Context
  12. 12How Action Order Affects Assigns to Context in a XState Machine
  13. 13Use Activities in XState to Run Ongoing Side Effects
  14. 14Conditionally Transition to States with Guards in XState
  15. 15Simplify State Explosion in XState through Hierarchical States
  16. 16Multiple Simultaneous States with Parallel States
  17. 17Recall Previous States with XState History States Nodes
  18. 18Use XState Null Events and Transient Transitions to Immediately Transition States
  19. 19Delay XState Events and Transitions
  20. 20Invoking a Promise for Asynchronous State Transitions in XState
  21. 21Invoke Callbacks to Send and Receive Events from a Parent XState Machine
  22. 22Invoke Child XState Machines from a Parent Machine

Similar state management courses

  1. Learn Redux: Redux Toolkit

    Codecademy · 1 lessons · Dec 2022

    Beginner1 h
    Codecademy1Dec 2022
  2. Build Redux Style Applications with Angular, RxJS, and ngrx/store

    egghead · John Lindquist · 16 lessons · 4.3 from 7 ratings · Apr 2016

    41 minSubscription
    egghead164.3 (7)Apr 2016
  3. Construct Sturdy UIs with XState

    egghead · Isaac Mann · 8 lessons · 4.6 from 25 ratings · Dec 2019

    35 minSubscription
    egghead84.6 (25)Dec 2019
  4. Manage Complex State in React Apps with MobX

    egghead · Michel Weststrate · 9 lessons · 4.1 from 13 ratings · Jul 2016

    28 minFree
    egghead94.1 (13)Jul 2016
  5. Beginner2 h
    Codecademy1Dec 2022
  6. Reactive Angular with NgRx

    Master.dev · Lukas Ruebbelke · 24 lessons · Jan 2019

    3 h 14 minSubscription
    Master.dev24Jan 2019
  7. Vuex for Intermediate Vue 2 Developers

    Master.dev · Divya S · 48 lessons · Aug 2020

    3 h 15 minSubscription
    Master.dev48Aug 2020
  8. Advanced Redux with Redux Toolkit

    Master.dev · Steve Kinney · 21 lessons · Feb 2023

    3 h 52 minSubscription
    Master.dev21Feb 2023

A hyphen means the provider's catalogue does not state the value.

Same topic, nearest in length, up to three from any one provider.

Data read from the egghead catalogue on 28 Nov 2026. How the data is collected.

    Compare