# XState 5.21.0 - Product: XState (https://whatsnew.fyi/product/xstate) - Vendor: Stately - Date: 2025-08-30 - Version: 5.21.0 - Original notes: https://github.com/statelyai/xstate/releases/tag/xstate%405.21.0 - Permalink: https://whatsnew.fyi/product/xstate/releases/5.21.0 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 .createStateConfig(…) to the setup API to create state configs that are strongly typed and modular ###### Minor Changes - [#5364](https://github.com/statelyai/xstate/pull/5364) [`15e15b5`](https://github.com/statelyai/xstate/commit/15e15b5e38e2fb3c2bd67ae584aa4e019d12699c) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Added `.createStateConfig(…)` to the setup API. This makes it possible to create state configs that are strongly typed and modular. ```ts const lightMachineSetup = setup({ // ... }); const green = lightMachineSetup.createStateConfig({ //... }); const yellow = lightMachineSetup.createStateConfig({ //... }); const red = lightMachineSetup.createStateConfig({ //... }); const machine = lightMachineSetup.createMachine({ initial: 'green', states: { green, yellow, red } }); ```