Skip to content
Version: XState v4

Invoke done events

An invoke done event transitions from a state once its invocation has been completed. An invoke done event is labeled “done:” followed by the invocation’s ID.

Create invoke done events

  1. Select the state with an invoked actor where you want to add an invoke done event.
  2. Drag from the handles on the left, right and bottom sides of the selected state, and release to create a connecting transition, event and new state.
  3. The newly-created event will automatically be created as an invoke done event.

You can also change an existing event into an invoked done event using the quick actions menu:

  1. Select the existing event you wish to change into an invoke done event.
  2. Right-click the state to open the quick actions menu.
  3. Choose Invocation done event from the Event type options.