xstate
5.33.4 · 7 Nov 2026MIT9M / weekRepositoryHomepagenpmAtom feed
4.38.3 is the newest release of 4.x.
In short
1 new1 fixed
Release note
Minor Changes
Spawned/invoked actors and interpreters are now typed as extending
ActorRef(e.g.,SpawnedActorRef) rather thanActororInterpreter. This unification of types should make it more straightforward to provide actor types:import { - Actor + ActorRef } from 'xstate'; // ... interface SomeContext { - server?: Actor; + server?: ActorRef<ServerEvent>; }It's also easier to specify the type of a spawned/invoked machine with
ActorRefFrom:import { createMachine, - Actor + ActorRefFrom } from 'xstate'; const serverMachine = createMachine<ServerContext, ServerEvent>({ // ... }); interface SomeContext { - server?: Actor; // difficult to type + server?: ActorRefFrom<typeof serverMachine>; }
Patch Changes
Fixed an issue with history state entering a wrong state if the most recent visit in its parent has been caused by a transient transition.
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.