# XState 6.0.0-alpha.12 - Product: XState (https://whatsnew.fyi/product/xstate) - Vendor: Stately - Date: 2026-06-29 - Version: 6.0.0-alpha.12 - Original notes: https://github.com/statelyai/xstate/releases/tag/xstate%406.0.0-alpha.12 - Permalink: https://whatsnew.fyi/product/xstate/releases/6.0.0-alpha.12 - 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'. --- - **fixed** — Spawning a child with enq.spawn(...) from a transition function now creates and starts the child actor exactly once for the committed transition - **changed** — serializeMachine(...) and createMachineFromConfig(...) now represent inline functions as { '@code': string, '@lang': 'ts' } and omit non-portable values such as actor logic, runtime schemas, class instances, symbols, and bigints from serialized JSON - **changed** — void and undefined are now accepted as type-only schemas - **changed** — Async logic output is now inferred from an input-only schema - **changed** — Actions and guards can now be typed via schemas - **changed** — trigger is now correctly typed on spawned actors ###### Patch Changes - 4d9ba1c: Spawning a child with `enq.spawn(...)` from a transition function now creates and starts the child actor exactly once for the committed transition. ```ts const machine = createMachine({ on: { spawn: (_, enq) => { enq.spawn(childMachine, { registryKey: 'child' }); } } }); ``` - 6798cb1: `serializeMachine(...)` and `createMachineFromConfig(...)` now represent inline functions (guards, actions, transitions, delays, route functions) as `{ '@code': string, '@lang': 'ts' }`. Non-portable values such as actor logic, runtime schemas, class instances, symbols, and bigints are omitted from the serialized JSON. ```ts import { serializeMachine } from 'xstate'; serializeMachine(machine); // inline functions → { '@code': '() => true', '@lang': 'ts' } ``` Type-only refinements: `void` and `undefined` are accepted as type-only schemas, async logic output is inferred from an input-only schema, actions/guards can be typed via `schemas`, and `trigger` is correctly typed on spawned actors.