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
Removed the ability to pass a model as a generic to
createMachine, in favour ofmodel.createMachine. This lets us cut an overload from the definition ofcreateMachine, meaning errors become more targeted and less cryptic.This means that this approach is no longer supported:
const model = createModel({}); const machine = createMachine<typeof model>();If you're using this approach, you should use
model.createMachineinstead:const model = createModel({}); const machine = model.createMachine();
Patch Changes
Fixed a regression in the inline actions type inference in models without explicit action creators.
const model = createModel( { foo: 100 }, { events: { BAR: () => ({}) } } ); model.createMachine({ // `ctx` was of type `any` entry: ctx => {}, exit: assign({ // `ctx` was of type `unknown` foo: ctx => 42 }) });
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.