# XState 5.24.0 - Product: XState (https://whatsnew.fyi/product/xstate) - Vendor: Stately - Date: 2025-11-03 - Version: 5.24.0 - Original notes: https://github.com/statelyai/xstate/releases/tag/xstate%405.24.0 - Permalink: https://whatsnew.fyi/product/xstate/releases/5.24.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** — Add setup.extend() method to incrementally extend machine setup configurations with additional actions, guards, and delays, enabling composable and reusable machine setups where extended actions, guards, and delays can reference base actions, guards, and delays and support chaining multiple extensions ###### Minor Changes - [#5371](https://github.com/statelyai/xstate/pull/5371) [`b8ec3b1`](https://github.com/statelyai/xstate/commit/b8ec3b153fbacae078c03cd07678271e0456679a) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Add `setup.extend()` method to incrementally extend machine setup configurations with additional actions, guards, and delays. This enables composable and reusable machine setups where extended actions, guards, and delays can reference base actions, guards, and delays and support chaining multiple extensions: ```ts import { setup, not, and } from 'xstate'; const baseSetup = setup({ guards: { isAuthenticated: () => true, hasPermission: () => false } }); const extendedSetup = baseSetup.extend({ guards: { // Type-safe guard references isUnauthenticated: not('isAuthenticated'), canAccess: and(['isAuthenticated', 'hasPermission']) } }); // Both base and extended guards are available extendedSetup.createMachine({ on: { LOGIN: { guard: 'isAuthenticated', target: 'authenticated' }, LOGOUT: { guard: 'isUnauthenticated', target: 'unauthenticated' } } }); ```