Major Changes
-
c27b509:
fromStore()now returns XState v6 actor logic and requiresxstate@6.xstateis declared as an optional peer dependency; it is only needed if you usefromStore(). Use@xstate/store@4with XState v5.import { createActor } from 'xstate'; import { fromStore } from '@xstate/store'; const logic = fromStore({ context: { count: 0 }, on: { inc: (ctx) => ({ count: ctx.count + 1 }) } }); const actor = createActor(logic).start(); actor.send({ type: 'inc' });