fix(deps): update dependency @xstate/react to version 6.x 🌟 (major)#1503
fix(deps): update dependency @xstate/react to version 6.x 🌟 (major)#1503renovate[bot] wants to merge 1 commit intodevelopfrom
Conversation
|
See the guidelines for reviewing dependency updates for info on how to review dependency update PRs. |
2c5764a to
424dd37
Compare
424dd37 to
fdb6fdd
Compare
fdb6fdd to
5df2a6f
Compare
5df2a6f to
83a262c
Compare
83a262c to
9276058
Compare
9276058 to
6e28c3d
Compare
6e28c3d to
4ddbdce
Compare
4ddbdce to
4960114
Compare
4960114 to
0364efb
Compare
0364efb to
8c8e423
Compare
8c8e423 to
d16093e
Compare
d16093e to
a6012e3
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 8 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| "uuid": "8.3.2", | ||
| "webpack": "5", | ||
| "xstate": "4.38.3", | ||
| "xstate": "5.30.0", |
There was a problem hiding this comment.
xstate v5 removes Machine export, breaking all machines
High Severity
Upgrading xstate from v4 to v5 removes the Machine export entirely (replaced by createMachine). All 7 machine files (authMachine.ts, dataMachine.ts, drawerMachine.ts, snackbarMachine.ts, createTransactionMachine.ts, transactionFiltersMachine.ts, userOnboardingMachine.ts) import Machine from "xstate", which will cause a runtime crash on import. The application cannot start at all with this change.
Additional Locations (1)
| "@okta/okta-react": "^6.7.0", | ||
| "@types/detect-port": "^1.3.2", | ||
| "@xstate/react": "3.2.2", | ||
| "@xstate/react": "6.1.0", |
There was a problem hiding this comment.
useActor no longer accepts actor references in v6
High Severity
Upgrading @xstate/react from v3 to v6 changes the useActor API — it now accepts actor logic (machines), not existing actor references. Five components (AlertBar, NavBar, NavDrawer, SignInForm, SignUpForm) pass Interpreter service instances to useActor, which will crash at runtime. These should use useSelector and useActorRef instead.
| "uuid": "8.3.2", | ||
| "webpack": "5", | ||
| "xstate": "4.38.3", | ||
| "xstate": "5.30.0", |
There was a problem hiding this comment.
send with string events removed in xstate v5
High Severity
xstate v5 no longer supports string arguments in send() — only event objects are accepted. Multiple components call send with strings: sendDrawer("TOGGLE_DESKTOP"), sendDrawer("TOGGLE_MOBILE"), sendDrawer("OPEN_DESKTOP", payload), sendDrawer("CLOSE_MOBILE"), and sendAuth("LOGOUT") in MainLayout.tsx and NavDrawer.tsx. These calls will throw or silently fail at runtime.
| "uuid": "8.3.2", | ||
| "webpack": "5", | ||
| "xstate": "4.38.3", | ||
| "xstate": "5.30.0", |
There was a problem hiding this comment.
interpret and State removed, breaking auth initialization
High Severity
xstate v5 removes interpret (now createActor) and State.create (now different rehydration API). authMachine.ts uses both: interpret(authMachine) to start the global auth service and State.create(stateDefinition) to rehydrate persisted state. This will crash during module initialization, preventing the auth system from working at all.
| "uuid": "8.3.2", | ||
| "webpack": "5", | ||
| "xstate": "4.38.3", | ||
| "xstate": "5.30.0", |
There was a problem hiding this comment.
withConfig removed, breaking derived machine definitions
High Severity
xstate v5 renames .withConfig() to .provide(). Six machine files (bankAccountsMachine, contactsTransactionsMachine, createTransactionMachine, notificationsMachine, personalTransactionsMachine, publicTransactionsMachine) use .withConfig() with a services key (also renamed to actors in v5) to configure data-fetching behavior. All these machines will fail to initialize.
| "uuid": "8.3.2", | ||
| "webpack": "5", | ||
| "xstate": "4.38.3", | ||
| "xstate": "5.30.0", |
There was a problem hiding this comment.
assign signature change silently corrupts all state updates
High Severity
xstate v5 changes the assign function signature from positional (context, event) => ... to a single object ({ context, event }) => .... All 12 assign() calls across authMachine.ts, dataMachine.ts, snackbarMachine.ts, and createTransactionMachine.ts use the old positional pattern. With v5, the first parameter receives the entire { context, event } object rather than just context, and the second parameter becomes undefined, silently corrupting every state assignment.
| "uuid": "8.3.2", | ||
| "webpack": "5", | ||
| "xstate": "4.38.3", | ||
| "xstate": "5.30.0", |
There was a problem hiding this comment.
cond and transient "" transitions removed in v5
High Severity
xstate v5 renames cond to guard and removes transient transitions via the empty string "" event (replaced by always). drawerMachine.ts uses cond: "shouldOpenDesktop" and dataMachine.ts uses both cond: "hasData" and the "": [...] transient transition syntax. The drawer's conditional desktop open logic and the data machine's automatic routing between withData/withoutData states would silently stop working.
| "uuid": "8.3.2", | ||
| "webpack": "5", | ||
| "xstate": "4.38.3", | ||
| "xstate": "5.30.0", |
There was a problem hiding this comment.
autoForward removed breaks child machine event forwarding
Medium Severity
xstate v5 completely removes the autoForward property from invoke configurations. createTransactionMachine.ts uses autoForward: true on the invoked transactionDataMachine to forward events like CREATE to the child data machine. Without auto-forwarding, the child machine would never receive these events, breaking the transaction creation flow.


This PR contains the following updates:
3.2.2→6.1.04.38.3→5.30.0Release Notes
statelyai/xstate (@xstate/react)
v6.1.0Compare Source
Minor Changes
#5470
3e03427Thanks @davidkpiano! -useActoranduseSelectornow throw when the actor reaches an error state, allowing errors to be caught by React error boundaries.v6.0.0Compare Source
Patch Changes
e07a7cd8462473188a0fb646a965e61be1ce6ae3]:v5.0.5Compare Source
Patch Changes
479c74b83fa77c57c48f54cf0e9dcfab5fe6cae5]:v5.0.4Compare Source
Patch Changes
b453b2d72ba12d0fe46a995f9ccced8000fd0cc9]:v5.0.3Compare Source
Patch Changes
9e1de554c4ebf49997b717fada540951d01f511cThanks @davidkpiano! - Added React 19 as a peer dependency.v5.0.2Compare Source
Patch Changes
80b9afbaeThanks @Andarist! - Fixed definingactorswithinputwithinsetup.v5.0.1Compare Source
Patch Changes
bf6119a7310a878afbf4f5b01f5e24288f9a0f16]:v5.0.0Compare Source
Patch Changes
#5109
d67b71dd25d457a2a59f2c943db13f50fab7ec3dThanks @davidkpiano! - Add React 19 as a peer dependencyUpdated dependencies [
8c4b70652acaef2702f32435362e4755679a516d]:v4.1.3Compare Source
Patch Changes
25963966c394fc904dc9b701a420b6e204ebe7f7]:v4.1.2Compare Source
Patch Changes
#5055
ad38c35c37Thanks @SandroMaglione! - Updated types ofuseActor,useMachine, anduseActorRefto requireinputwhen defined insidetypes/input.Previously even when
inputwas defined insidetypes,useActor,useMachine, anduseActorRefwould not make the input required:With this change the above code will show a type error, since
inputis now required:This avoids runtime errors when forgetting to pass
inputwhen defined insidetypes.v4.1.1Compare Source
Patch Changes
#4844
5aa6eb05cThanks @davidkpiano! - TheuseSelector(…)hook from@xstate/reactis now compatible with stores from@xstate/store.v4.1.0Compare Source
Minor Changes
#4231
c2402e7bcThanks @davidkpiano! - Theactorpassed touseSelector(actor, selector)is now allowed to beundefinedfor an actor that may not exist yet. For actors that may beundefined, thesnapshotprovided to theselectorfunction can also beundefined:v4.0.3Compare Source
Patch Changes
#4695
52900a084Thanks @davidkpiano! - Options increateActorContextare now properly merged with provider options. Previously, provider options replaced the actor options.v4.0.2Compare Source
Patch Changes
1f2ccb97cThanks @davidkpiano! - Typegen-based types for detecting missing implementations have been removed internally.v4.0.1Compare Source
Patch Changes
d7f220225Thanks @davidkpiano! - Fix an issue whereaftertransitions do not work in React strict mode. Delayed events (including fromaftertransitions) should now work as expected in all React modes.v4.0.0Compare Source
Major Changes
#3947
5fa3a0c74Thanks @davidkpiano! - Removed the ability to pass a factory function as argument touseMachine.#4006
42df9a536Thanks @davidkpiano! -useActorRefis introduced, which returns anActorReffrom actor logic:is deprecated in favor ofuseMachineuseActor, which works with machines and any other kind of logicis removed in favor ofuseSpawnuseActorRef#4050
fc88dc8e6Thanks @davidkpiano! - Theoptionsprop has been added (back) to theContext.Providercomponent returned fromcreateActorContext:#4006
42df9a536Thanks @davidkpiano! -useActorhas been removed from the created actor context, you should be able to replace its usage withMyCtx.useSelectorandMyCtx.useActorRef.#4265
1153b3f9aThanks @davidkpiano! - FSM-related functions have been removed.#3947
5fa3a0c74Thanks @davidkpiano! - Implementations for machines onuseMachinehooks should go directly on the machine viamachine.provide(...), and are no longer allowed to be passed in as options.#3148
7a68cbb61Thanks @davidkpiano! - RemovedgetSnapshotparameter from hooks. It is expected that the receivedactorRefhas to have agetSnapshotmethod on it that can be used internally.Minor Changes
5fb3c683dThanks @Andarist! -exportsfield has been added to thepackage.jsonmanifest. 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.409552cf8Thanks @davidkpiano! - TheuseMachinefunction is an alias ofuseActor.340aee643Thanks @Andarist! - Fast refresh now works as expected for most use-cases.fc88dc8e6Thanks @davidkpiano! - TheobserverOrListenerargument has been removed from the 3rd argument ofcreateActorContext(logic, options).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 was generated by Mend Renovate. View the repository job log.
Note
High Risk
Upgrades XState from v4 to v5 and
@xstate/reactfrom v3 to v6, which include major breaking API/typing changes and can break existing machine/interpreter and hook usage at runtime and compile time.Overview
Updates state-machine dependencies by bumping
xstatefrom4.38.3to5.30.0and@xstate/reactfrom3.2.2to6.1.0, with correspondingyarn.lockupdates (includinguse-sync-external-store).No application code is changed, so any required migration for XState v5 /
@xstate/reactv6 APIs will surface as build/test failures after the dependency upgrade.Written by Cursor Bugbot for commit a6012e3. This will update automatically on new commits. Configure here.