Releases: statelyai/xstate
Releases · statelyai/xstate
[email protected]
@xstate/[email protected]
@xstate/[email protected]
[email protected]
Minor Changes
-
#4596
6113a590a
Thanks @davidkpiano! - IntroducegetNextSnapshot(...)
, which determines the next snapshot for the givenactorLogic
based on the givensnapshot
andevent
.If the
snapshot
isundefined
, the initial snapshot of theactorLogic
is used.import { getNextSnapshot } from 'xstate'; import { trafficLightMachine } from './trafficLightMachine.ts'; const nextSnapshot = getNextSnapshot( trafficLightMachine, // actor logic undefined, // snapshot (or initial state if undefined) { type: 'TIMER' } ); // event object console.log(nextSnapshot.value); // => 'yellow' const nextSnapshot2 = getNextSnapshot( trafficLightMachine, // actor logic nextSnapshot, // snapshot { type: 'TIMER' } ); // event object console.log(nextSnapshot2.value); // =>'red'
Patch Changes
[email protected]
Patch Changes
- #4600
1f2ccb97c
Thanks @davidkpiano! - Typegen-based types for detecting missing implementations have been removed internally.
@xstate/[email protected]
Patch Changes
- #4600
1f2ccb97c
Thanks @davidkpiano! - Typegen-based types for detecting missing implementations have been removed internally.
@xstate/[email protected]
Patch Changes
- #4600
1f2ccb97c
Thanks @davidkpiano! - Typegen-based types for detecting missing implementations have been removed internally.
@xstate/[email protected]
Patch Changes
- #4600
1f2ccb97c
Thanks @davidkpiano! - Typegen-based types for detecting missing implementations have been removed internally.
[email protected]
[email protected]
Patch Changes
-
#4597
ae0b05f11
Thanks @davidkpiano! - Update the argument object ofenqueueActions(...)
to include theself
andsystem
properties:// ... entry: enqueueActions(({ self, system }) => { // ... });