Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
xstate@4.33.0
Minor Changes
#3289
c0a147e25
Thanks @Andarist! - A newpredictableActionArguments
feature flag has been added that allows you to opt into some fixed behaviors that will be the default in v5. With this flag:preserveActionOrder
.Please be aware that you might not able to use
state
from themeta
argument when using this flag.#3126
37b751cb3
Thanks @Andarist! - Allexit
actions in the machine will now be correctly resolved and executed when a machine gets stopped or reaches its top-level final state. Previously, the actions were not correctly resolved and that was leading to runtime errors.To implement this fix in a reliable way, a new internal event has been introduced:
{ type: 'xstate.stop' }
and when the machine stops its execution, all exit handlers of the current state (i.e. the active state nodes) will be called with that event. You should always assume that an exit handler might be called with that event.Patch Changes
#3178
6badd2ba3
Thanks @davidkpiano! - Added a dev-only error whenforwardTo
accidentally ends up trying to forward an event to an undefined actor. Such a situation indicates a logical error and risks an infinite loop.#3453
368ed9b1c
Thanks @pixtron! - Call thecomplete
callback of the subscribedobserver
when an interpreter gets stopped.#3422
e35493f59
Thanks @Andarist! - Fixed an issue with parallel regions not always being correctly reentered on external transitions of the containing parallel state targeting another region within that parallel state.#3447
e93754d7a
Thanks @davidkpiano! - The types forstate.nextEvents
are now properly typed to the actual event types of the machine. Original PR: Giving better type information for nextEvents #1115 (Thanks @alexreardon!)#3424
88d540eb8
Thanks @Andarist! - Fixed an issue with targeted ancestors not being correctly reentered during external transitions.@xstate/react@3.0.1
Patch Changes
#3456
131d429ab
Thanks @davidkpiano! - AddshallowEqual
helper comparator function.#3500
0dfc6d92f
Thanks @Andarist! - Fixed an issue withuseSelector
always computing fresh snapshots internally for uninitialized services. This avoids the internaluseSyncExternalStore
from warning about the snapshot value not being cached properly.