Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README.md | 2025-08-30 | 828 Bytes | |
xstate@5.21.0 source code.tar.gz | 2025-08-30 | 6.7 MB | |
xstate@5.21.0 source code.zip | 2025-08-30 | 7.2 MB | |
Totals: 3 Items | 13.9 MB | 0 |
Minor Changes
-
#5364
15e15b5
Thanks @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 } }); ```