Packages

xstate

5.33.4 · 7 Nov 2026MIT9M / weekRepositoryHomepagenpmAtom feed

Your version

4.10.0

20 May 2020Where it was published

4.38.3 is the newest release of 4.x.

In short

3 new5 fixed

Release note

Minor Changes

  • The types for the send() and sendParent() action creators have been changed to fix the issue of only being able to send events that the machine can receive. In reality, a machine can and should send events to other actors that it might not be able to receive itself. See #711 for more information.

  • Previously, state.matches(...) was problematic because it was casting state to never if it didn't match the state value. This is now fixed by making the Typestate resolution more granular.

  • Actions from a restored state provided as a custom initial state to interpret(machine).start(initialState) are now executed properly. See #1174 for more information.

Patch Changes

  • Fix passing state schema into State generic

  • Fixed an issue with invoked service not being correctly started if other service got stopped in a subsequent microstep (in response to raised or null event).

  • Delayed transitions defined using after were previously causing a circular dependency when the machine was converted using .toJSON(). This has now been fixed.

  • Fixed an issue with choose and pure not being able to use actions defined in options.

  • XState will now warn if you define an .onDone transition on the root node. Root nodes which are "done" represent the machine being in its final state, and can no longer accept any events. This has been reported as confusing in #1111.

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.