Transcript from the "Refactoring with XState Solution" Lesson
>> Finishing up this exercise, we have the send, where we have currentState. So whenever we have a click events, we're going to send: 'CLICK'. And so inside of our send, we're updating the current state with machine.transition. And this is going to use Xstate instead of our own transition function in order to determine the next state.
[00:00:26] Then we're setting the data state attribute of eLBox to the currentState's value. And so if we go to Exercise 02, we're gonna see that it works the exact same way, with the difference that if we log out the currentState, We actually see an Xstate state object instead of just our string over here.