Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
brandyscarney
approved these changes
Aug 14, 2026
brandyscarney
left a comment
Member
There was a problem hiding this comment.
Looks good! Just one question on a change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue number: internal
What is the current behavior?
Currently,
BREAKING.mdand the v9 upgrade guide both state that Ionic 9 requires React 18, but nothing enforces it.@ionic/reactand@ionic/react-routerstill declarereact: >=16.8.6inpeerDependencies, byte-identical to v8, so a React 17 app installs Ionic 9 without an error. CI still builds and tests areact17app, and both test-app sync scripts pass--legacy-peer-deps, which hides the mismatch.The only signal a React 17 user gets today is a pair of
npm warn ERESOLVE overriding peer dependencylines, coming from@stencil/react-output-target, which declaresreact: ^18 || ^19and is a runtime dependency of@ionic/react. Because that peer is nested rather than direct, npm overrides it and installs anyway, so the documented floor never actually applies.What is the new behavior?
Both packages now declare
react: ^18 || ^19. Installing@ionic/reactinto a React 17 project fails withERESOLVE, and the error names@ionic/reactrather than the output target. We deleted thereact17test app and dropped it from the react matrix inbuild.ymlandstencil-nightly.yml.packages/react-routerwas still building against React 17 types, so its React devDependencies move to 18 alongsidepackages/react. That surfaced one genuine error the old types were hiding:StackManagerPropsrelied on the implicitchildrenthat@types/react18 removed fromReact.Component, so it declareschildren: React.ReactNodenow.Does this introduce a breaking change?
Applications on React 17 need to move to React 18 or 19 before upgrading to Ionic 9. This changes enforcement rather than policy: #31063 dropped React 17 back in April with a
BREAKING CHANGEfooter and added theBREAKING.mdrow. What changes here is thatnpm installnow refuses instead of installing with a warning. Technically React 17 may still work, but we do not officially support it.Other information
On why the React 18 types weren't already breaking react-router: #31063 moved
packages/reactto React 18 in April and did the implicit-children migration in the same commit, adding explicitchildren: React.ReactNodedeclarations toIonPage,IonRouterOutlet,OutletPageManager,NavManagerand others. It never touchedpackages/react-router, which stayed on@types/react: ^17.0.79. The two packages have separate tsconfigs and separatetypechecksteps in CI, so nothing forced react-router to see React 18 types, andStackManagerleaning on implicitchildrenkept compiling against 17. It only failed once the devDependency bump in this PR put the 18 types in front of it.The range is
^18 || ^19rather than a>=18.0.0floor so it matches@stencil/react-output-targetexactly.