Skip to content

xstate@4.36.0

Compare
Choose a tag to compare
@github-actions github-actions released this 13 Feb 09:52
· 1420 commits to main since this release

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
    });