-
Notifications
You must be signed in to change notification settings - Fork 153
fix(deps): Update dependency @xstate/react to v3 #287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
⚠ Artifact update problemRenovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is. ♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
The artifact failure details are included below: File name: package-lock.json |
d42b621 to
5baa0a8
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
💡 Enable Vercel Agent with $100 free credit for automated AI reviews |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
5baa0a8 to
b621ff5
Compare
b621ff5 to
09fab96
Compare
This PR contains the following updates:
^1.2.0->^3.2.2Release Notes
statelyai/xstate (@xstate/react)
v3.2.2Compare Source
Patch Changes
6665f0a32Thanks @c-w! - Updated the allowed range for theuse-isomorphic-layout-effectdependency.v3.2.1Compare Source
Patch Changes
c110c429dThanks @Andarist! - Fixed compatibility of the generated TS types forcreateActorContextwith pre-4.7.v3.2.0Compare Source
Minor Changes
#3814
494203b3dThanks @Andarist! - TheProviderfromcreateActorContext(...)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.2Compare Source
Patch Changes
b53856d28Thanks @farskid! - Interpreter options can now be specified in the second argument of createActorContext(machine, options).v3.1.1Compare Source
Patch Changes
51d254692Thanks @Andarist! - Fixed an issue that caused the internally useduseSyncExternalStoreto warn about the computed snapshot not being cached when a not-started machine servive was passed touseActor.v3.1.0Compare Source
Minor Changes
#3778
f12248b23Thanks @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.2Compare Source
Patch Changes
4190c3fd6Thanks @davidkpiano! - Computing the initial state is now consistent withuseMachineanduseActor, avoiding stale initial state problems with nested machinesv3.0.1Compare Source
Patch Changes
#3456
131d429abThanks @davidkpiano! - AddshallowEqualhelper comparator function.#3500
0dfc6d92fThanks @Andarist! - Fixed an issue withuseSelectoralways computing fresh snapshots internally for uninitialized services. This avoids the internaluseSyncExternalStorefrom warning about the snapshot value not being cached properly.v3.0.0Compare Source
Major Changes
#2939
360e85462Thanks @Andarist! - This package now accepts React 18 as a peer dep and the implementation has been rewritten to useuse-sync-external-storepackage. This doesn't break compatibility with older versions of React since we are using the shim to keep compatibility with those older versions.#2939
360e85462Thanks @Andarist! -asEffectandasLayoutEffectaction creators were removed. They were not fitting the React model that well and could lead to issues as their existence suggested that they are easy to use.To execute actions at those exact times you can always either just call your stuff directly from those effects or send events to the machine from those effects and execute explicit actions in response to said events.
#2939
360e85462Thanks @Andarist! - The signatures ofuseMachineanduseServiceintegrating with@xstate/fsmwere changed. They now only accept a single generic each (TMachineandTServicerespectively). This has been done to match their signatures with the related hooks that integrate withxstateitself.Patch Changes
#2939
360e85462Thanks @Andarist! - In v2 we have changed signatures ofuseMachineanduseInterpret. Instead of accepting a list of generics they now only support a single generic:TMachine. This change, erroneously, was only introduced to types targeting [email protected] but the types targeting previous TS releases were still using the older signatures. This has now been fixed and users of older TS versions should now be able to leverage typegen with@xstate/react.#2939
360e85462Thanks @Andarist! -useMachineforxstatenow correctly rerenders with the initial state when the internal service is being restarted. This might happen during Fast Refresh and now you shouldn't be able to observe this stale state that didn't match the actual state of the service.#2939
360e85462Thanks @Andarist! -useMachinefor@xstate/fsmnow starts the service in an effect. This avoids side-effects in render and improves the compatibility withStrictMode.#2939
360e85462Thanks @Andarist! - Implementations given touseMachinetargeting@xstate/fsmare now updated in a layout effect. This avoid some stale closure problems for actions that are executed in response to events sent from layout effects.Updated dependencies [
360e85462,360e85462]:v2.0.1Compare Source
Patch Changes
862697e29Thanks @Andarist! - Fixed compatibility with Skypack by exporting some shared utilities from root entry of XState and consuming them directly in other packages (this avoids accessing those things using deep imports and thus it avoids creating those compatibility problems).v2.0.0Compare Source
Major Changes
#2674
e5a8b8dffThanks @Andarist, @mattpocock! - To avoid breaking any consumers and to leverage the newly introduced typegen support, the major version of this package had to be bumped. While you can still use it with older versions of TS, the typegen support in this package requires TS version 4.0 or greater.When using hooks from
@xstate/reactit's recommended to skip providing explicit generics to them. Note that that generics list has changed since v1 and we now only accept a single generic,TMachine.#2674
ab919d300Thanks @Andarist! - Removed already deprecateduseServicefrom@xstate/react. You can replace its usage withuseActor.Patch Changes
8550ddda7Thanks @davidkpiano! - The repository links have been updated fromgithub.com/davidkpianotogithub.com/statelyai.Configuration
📅 Schedule: Branch creation - "before 3am on Monday" (UTC), 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.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate using a curated preset maintained by
. View repository job log here