1×
Become a member
to unlock all features

Create egghead account to access 5000+ tutorials and resources from expert developers.

Create account
Autoplay

    Send Events to the Machine with the XState Send Action Creator

    xstateXState
    >=4.6.7

    XState provides the send function to create an action that will send the event passed in to the machine. If we provide the second argument to the send function, the options object, we can send the event to a particular machine. This is useful when you have invoked a machine as a service on a state node, a concept that will be explored in a later lesson.