Packages

xstate

5.33.4 · 7 Nov 2026MIT9M / weekRepositoryHomepagenpmAtom feed

Your version

4.36.0

13 Feb 2023Where it was published

4.38.3 is the newest release of 4.x.

In short

1 deprecated1 new2 fixed

  • Deprecated

    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.

Release note

Minor Changes

  • Deprecated

    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.

  • Fixed a class of inference problems for our builtin actions (assign, sendTo, etc).

  • 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

  • Fixed inference for assign using PropertyAssigner, like here:

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

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.