unstale

npm / @xstate/react

@xstate/react

What changed in @xstate/react 5 to 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-20.

4 breaking1 new APIs and options

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.8 on npm

@xstate/react 62 changes

Breaking changes 2

  • useActor now throws when the actor reaches an error state, allowing errors to be caught by React error boundaries.

    6.1.0release notes

  • useSelector now throws when the actor reaches an error state, allowing errors to be caught by React error boundaries.

    6.1.0release notes

@xstate/react 53 changes

Breaking changes 2

  • Pass a machine with provided implementations directly as the first argument to useMachine(), useActor(), or useActorRef(); these hooks no longer accept lazy machine creators or implementations as a second argument.

    5.0.0upgrade guide

  • Now accepts actor logic instead of an existing ActorRef; use useSelector(actor, ...) to read an existing actor’s snapshot.

    5.0.0upgrade guide

New APIs and options 1

  • Replaces the useInterpret() hook for returning an actor reference.

    5.0.0upgrade guide