Want more egghead?

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Become a Member
Become a member
to unlock all features

    Invoke an XState Service when Entering a State


    It can be tedious to create a paired success and failure event for each external action that a state machine triggers. Instead xstate can integrate directly with a promise and respond to the resolve or reject status of the promise itself.