Releases: statelyai/xstate
xstate@5.19.0
Minor Changes
-
#4954
8c4b70652acaef2702f32435362e4755679a516d
Thanks @davidkpiano! - Added a newtransition
function that takes an actor logic, a snapshot, and an event, and returns a tuple containing the next snapshot and the actions to execute. This function is a pure function and does not execute the actions itself. It can be used like this:import { transition } from 'xstate'; const [nextState, actions] = transition(actorLogic, currentState, event); // Execute actions as needed
Added a new
initialTransition
function that takes an actor logic and an optional input, and returns a tuple containing the initial snapshot and the actions to execute from the initial transition. This function is also a pure function and does not execute the actions itself. It can be used like this:import { initialTransition } from 'xstate'; const [initialState, actions] = initialTransition(actorLogic, input); // Execute actions as needed
These new functions provide a way to separate the calculation of the next snapshot and actions from the execution of those actions, allowing for more control and flexibility in the transition process.
@xstate/vue@4.0.0
Patch Changes
- Updated dependencies [
8c4b70652acaef2702f32435362e4755679a516d
]:- xstate@5.19.0
@xstate/svelte@4.0.0
Patch Changes
- Updated dependencies [
8c4b70652acaef2702f32435362e4755679a516d
]:- xstate@5.19.0
@xstate/store@2.6.1
Patch Changes
- #5109
d67b71dd25d457a2a59f2c943db13f50fab7ec3d
Thanks @davidkpiano! - Add React 19 as a peer dependency
@xstate/solid@1.0.0
Patch Changes
- Updated dependencies [
8c4b70652acaef2702f32435362e4755679a516d
]:- xstate@5.19.0
@xstate/react@5.0.0
Patch Changes
-
#5109
d67b71dd25d457a2a59f2c943db13f50fab7ec3d
Thanks @davidkpiano! - Add React 19 as a peer dependency -
Updated dependencies [
8c4b70652acaef2702f32435362e4755679a516d
]:- xstate@5.19.0
@xstate/graph@3.0.0
Patch Changes
- Updated dependencies [
8c4b70652acaef2702f32435362e4755679a516d
]:- xstate@5.19.0
@xstate/solid@0.2.3
Patch Changes
- #5100
519188af785527195eea15972efbb260289c9979
Thanks @GoldingAustin! - When setting new array indexes, if the value is an object/array, use placeholder empty value to prevent mutation of original machine context
xstate@5.18.2
Patch Changes
- #5079
25963966c394fc904dc9b701a420b6e204ebe7f7
Thanks @davidkpiano! - The inspection event interfaces now expectActorRefLike
instead ofAnyActorRef
@xstate/vue@3.1.4
Patch Changes
- Updated dependencies [
25963966c394fc904dc9b701a420b6e204ebe7f7
]:- xstate@5.18.2