github statelyai/xstate xstate@4.36.0

latest releases: @xstate/vue@4.0.0, @xstate/store@2.6.1, @xstate/svelte@4.0.0...
21 months ago

Minor Changes

  • #3393 430986cdf Thanks @davidkpiano! - Deprecated send() action creator. Instead of that, you can use sendTo() to send events to other actors and raise() to send events to the "self" actor.

  • #3802 8743ad0bd Thanks @Andarist! - Fixed a class of inference problems for our builtin actions (assign, sendTo, etc).

  • #3694 fd589055b Thanks @Andarist! - All actions received a new generic: TExpressionEvent. To type things more correctly and allow TS to infer things better we need to distinguish between all events accepted by a machine (TEvent) and the event type that actions are "called" with (TExpressionEvent).

    It's best to rely on type inference so you shouldn't have to specify this generic manually all over the place.

Patch Changes

  • #3818 2d8d84fd8 Thanks @Andarist! - Fixed inference for assign using PropertyAssigner, like here:

    actions: assign({
      counter: 0,
      delta: (ctx, ev) => ev.delta
    });

Don't miss a new xstate release

NewReleases is sending notifications on new releases.