This course has been updated! We now recommend you take the State Machines in JavaScript with XState, v2 course.
Transcript from the "Refactoring with XState Exercise" Lesson
[00:00:00]
>> In case you wanna do exercise two, in order to get more of a feel for Xstate, you could take your object syntax that you had over here in exercise one, copy that over inside of createMachine. And so, if you recall, it's the exact same syntax and then we're going to be setting our currentStates to machine.initial.
[00:00:27] And then our send is just going to be currentState is the machine.transition, the currentState and the events. And so this is going to be how we use XState in order to do the exact same thing that we did in exercise one. So exercise three encompasses both exercise two and using an interpreter.
[00:00:58] So we're just mushing those into one exercise.