Skip to content
Version: XState v4

Self transitions

A self-transition starts and ends in the same state.

Self-transitions can be used to restart a state.

Using self-transitions in Stately Studio​

Make an event into a self-transition​

On the canvas​

  1. Right-click the event to open the edit menu.
  2. Choose Make self transition from the edit menu.

Dragging the transition arrow​

  1. Select the event.
  2. Grab the circular handle at the arrow end of the transition and drag the handle to connect it back to the source state.