github statelyai/xstate xstate@4.27.0

latest releases: @xstate/solid@0.2.3, @xstate/svelte@3.0.5, @xstate/vue@3.1.4...
2 years ago

Minor Changes

  • #2800 759a90155 Thanks @davidkpiano! - The sendTo(actorRef, event) action creator has been introduced. It allows you to specify the recipient actor ref of an event first, so that the event can be strongly typed against the events allowed to be received by the actor ref:

    // ...
    entry: sendTo(
      (ctx) => ctx.someActorRef,
      { type: 'EVENT_FOR_ACTOR' }
    ),
    // ...

Patch Changes

  • #2804 f3caecf5a Thanks @davidkpiano! - The state.can(...) method no longer unnecessarily executes assign() actions and instead determines if a given event will change the state by reading transition data before evaluating actions.

  • #2856 49c2e9094 Thanks @Andarist! - Fixed an issue with stopped children sometimes starting their own child actors. This could happen when the child was stopped synchronously (for example by its parent) when transitioning to an invoking state.

  • #2895 df5ffce14 Thanks @Andarist! - Fixed an issue with some exit handlers being executed more than once when stopping a machine.

Don't miss a new xstate release

NewReleases is sending notifications on new releases.