fix(deps): update dependency @xstate/react to version 4.x 🌟 (major) #1503
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 contains the following updates:
3.0.0
->4.0.3
4.35.4
->5.6.0
Release Notes
statelyai/xstate (@​xstate/react)
v4.0.3
Compare Source
Patch Changes
#​4695
52900a084
Thanks @​davidkpiano! - Options increateActorContext
are now properly merged with provider options. Previously, provider options replaced the actor options.v4.0.2
Compare Source
Patch Changes
1f2ccb97c
Thanks @​davidkpiano! - Typegen-based types for detecting missing implementations have been removed internally.v4.0.1
Compare Source
Patch Changes
d7f220225
Thanks @​davidkpiano! - Fix an issue whereafter
transitions do not work in React strict mode. Delayed events (including fromafter
transitions) should now work as expected in all React modes.v4.0.0
Compare Source
Major Changes
#​3947
5fa3a0c74
Thanks @​davidkpiano! - Removed the ability to pass a factory function as argument touseMachine
.#​4006
42df9a536
Thanks @​davidkpiano! -useActorRef
is introduced, which returns anActorRef
from actor logic:~~
useMachine
~~ is deprecated in favor ofuseActor
, which works with machines and any other kind of logic~~
useSpawn
~~ is removed in favor ofuseActorRef
#​4050
fc88dc8e6
Thanks @​davidkpiano! - Theoptions
prop has been added (back) to theContext.Provider
component returned fromcreateActorContext
:#​4006
42df9a536
Thanks @​davidkpiano! -useActor
has been removed from the created actor context, you should be able to replace its usage withMyCtx.useSelector
andMyCtx.useActorRef
.#​4265
1153b3f9a
Thanks @​davidkpiano! - FSM-related functions have been removed.#​3947
5fa3a0c74
Thanks @​davidkpiano! - Implementations for machines onuseMachine
hooks should go directly on the machine viamachine.provide(...)
, and are no longer allowed to be passed in as options.#​3148
7a68cbb61
Thanks @​davidkpiano! - RemovedgetSnapshot
parameter from hooks. It is expected that the receivedactorRef
has to have agetSnapshot
method on it that can be used internally.Minor Changes
5fb3c683d
Thanks @​Andarist! -exports
field has been added to thepackage.json
manifest. It limits what files can be imported from a package - it's no longer possible to import from files that are not considered to be a part of the public API.409552cf8
Thanks @​davidkpiano! - TheuseMachine
function is an alias ofuseActor
.340aee643
Thanks @​Andarist! - Fast refresh now works as expected for most use-cases.fc88dc8e6
Thanks @​davidkpiano! - TheobserverOrListener
argument has been removed from the 3rd argument ofcreateActorContext(logic, options)
.v3.2.2
Compare Source
Patch Changes
6665f0a32
Thanks @​c-w! - Updated the allowed range for theuse-isomorphic-layout-effect
dependency.v3.2.1
Compare Source
Patch Changes
c110c429d
Thanks @​Andarist! - Fixed compatibility of the generated TS types forcreateActorContext
with pre-4.7.v3.2.0
Compare Source
Minor Changes
#​3814
494203b3d
Thanks @​Andarist! - TheProvider
fromcreateActorContext(...)
now accepts theoptions={{...}}
prop that takes the same object as the second argument to theuseMachine(machine, options)
hook.These options are no longer passed as the second argument to the
createActorContext(machine)
function:v3.1.2
Compare Source
Patch Changes
b53856d28
Thanks @​farskid! - Interpreter options can now be specified in the second argument of createActorContext(machine, options).v3.1.1
Compare Source
Patch Changes
51d254692
Thanks @​Andarist! - Fixed an issue that caused the internally useduseSyncExternalStore
to warn about the computed snapshot not being cached when a not-started machine servive was passed touseActor
.v3.1.0
Compare Source
Minor Changes
#​3778
f12248b23
Thanks @​davidkpiano! - ThecreateActorContext(...)
helper has been introduced to make global actors easier to use with React. It outputs a React Context object with the following properties:.Provider
- The React Context provider.useActor(...)
- A hook that can be used to get the current state and send events to the actor.useSelector(...)
- A hook that can be used to select some derived state from the actor's state.useActorRef()
- A hook that can be used to get a reference to the actor that can be passed to other componentsUsage:
v3.0.2
Compare Source
Patch Changes
3ad929eb4
Thanks @​tkofh! - TheuseActor
hook now correctly types it'ssend
function when passed anActorLogic
.v3.0.1
Compare Source
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.Configuration
📅 Schedule: Branch creation - "before 3am on the first day of the month" in timezone America/New_York, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
â™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Mend Renovate. View repository job log here.