Stately
XstateV6XState Store

Migration

Update applications for the current XState Store API.

XState v6 is in beta

APIs and behavior may change before the stable release. Read the stable v5 docs.

Upgrade the package, then update one store at a time.

npm install @xstate/store@alpha

Check these areas:

  • Transition functions return the complete next context.
  • Effects use the transition enqueue argument.
  • Framework selectors use packages such as @xstate/store-react.
  • Persistence and undo imports use their extension entry points.
  • Tests send public events instead of changing context directly.
  • fromStore() requires XState v6; with XState v5, use @xstate/store@4.

Run type checking after each store. Type errors often identify renamed events and incomplete context returns.