github statelyai/xstate xstate@5.0.0-beta.40

latest releases: @xstate/solid@0.2.3, @xstate/svelte@3.0.5, @xstate/vue@3.1.4...
pre-release12 months ago

Minor Changes

  • #4414 26fbc6c85 Thanks @davidkpiano! - All inspector events (snapshot, event, actor) now have a common actorRef property. This makes it easier to discern which inspection event is for which actor:

    const actor = createActor(someMachine, {
      inspect: (event) => {
        // Was previously a type error
        if (event.actorRef === actor) {
          // This event is for the root actor
        }
    
        if (event.type === '@xstate.event') {
          // previously event.targetRef
          event.actorRef;
        }
      }
    });

    In the 'xstate.event' event, the actorRef property is now the target actor (recipient of the event). Previously, this was the event.targetRef property (which is now removed).

Patch Changes

Don't miss a new xstate release

NewReleases is sending notifications on new releases.