# XState 6.0.0-alpha.13 - Product: XState (https://whatsnew.fyi/product/xstate) - Vendor: Stately - Date: 2026-06-30 - Version: 6.0.0-alpha.13 - Original notes: https://github.com/statelyai/xstate/releases/tag/xstate%406.0.0-alpha.13 - Permalink: https://whatsnew.fyi/product/xstate/releases/6.0.0-alpha.13 - Labels: Pre-release What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. --- - **added** — Added `createFSM(...)` for flat, actor-compatible finite state machines with support for object transitions, function transitions, `enq` actions, initial input, state `input`, entry actions, and exit actions - **changed** — Object transition configs now support dynamic context patches with a `context` mapper function ###### Minor Changes - bdc54dd: Added `createFSM(...)` for flat, actor-compatible finite state machines. ```ts import { createActor, createFSM } from 'xstate'; const toggleLogic = createFSM({ initial: 'inactive', context: { count: 0 }, states: { inactive: { on: { toggle: { target: 'active', context: { count: 1 } } } }, active: { on: { toggle: ({ context }, enq) => { enq(() => console.log('toggled')); return { target: 'inactive', context: { count: context.count + 1 } }; } } } } }); const actor = createActor(toggleLogic).start(); actor.send({ type: 'toggle' }); ``` `createFSM(...)` supports XState-style object transitions, function transitions, `enq` actions, initial input, state `input`, entry actions, and exit actions. Plain string targets are intentionally not supported; use object targets such as `{ target: 'active' }`. Simple FSM transitions preserve immutable public snapshots while using structural sharing and a lighter transition path for common `{ target }`, `{ context }`, and `{ target, context }` transitions. ###### Patch Changes - e297115: Object transition configs now support dynamic context patches with a `context` mapper. ```ts onDone: { target: 'done', context: ({ context, output }) => ({ answer: output, memory: [...context.memory, output] }) } ```