# What changed in @xstate/react

> 5 changes in @xstate/react 5 to 6 from its official release notes, upgrade guides and advisories: 4 breaking, 1 new APIs and options. Each one cited. Sources checked 2026-10-20. HTML: https://unstale.sh/npm/@xstate/react/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @xstate/react 6

### Breaking changes

- useActor now throws when the actor reaches an error state, allowing errors to be caught by React error boundaries. (6.1.0) — [release notes](https://github.com/statelyai/xstate/releases/tag/%40xstate/react%406.1.0)
- useSelector now throws when the actor reaches an error state, allowing errors to be caught by React error boundaries. (6.1.0) — [release notes](https://github.com/statelyai/xstate/releases/tag/%40xstate/react%406.1.0)

## @xstate/react 5

### Breaking changes

- 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.0) — [upgrade guide](https://stately.ai/docs/migration)
- Now accepts actor logic instead of an existing ActorRef; use useSelector(actor, ...) to read an existing actor’s snapshot. (5.0.0) — [upgrade guide](https://stately.ai/docs/migration)

### New APIs and options

- Replaces the useInterpret() hook for returning an actor reference. (5.0.0) — [upgrade guide](https://stately.ai/docs/migration)
