Skip to content

feat(react-router): support react router 7 - #31508

Open
ShaneK wants to merge 3 commits into
feature-9.1from
feat/rr7-squash
Open

ShaneK wants to merge 3 commits into
feature-9.1from
feat/rr7-squash

Conversation

@ShaneK

@ShaneK ShaneK commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Issue number: #30745


What is the current behavior?

Currently, @ionic/react-router only supports React Router 6. On 7, router updates run inside React.startTransition, so Ionic's page-visible signal can fire before the incoming page exists, and an index <Navigate> under a splat route redirects in a loop.

What is the new behavior?

The peer ranges now accept React Router 6.4+ and 7.15+. The routers default useTransitions to false, which apps can override, and relative links under a splat resolve against the splat's base on both majors. The floor is 7.15 because that's the first release with useTransitions under that name.

CI adds a reactrouter7-react19 test app and a React Router 7 typecheck lane.

Does this introduce a breaking change?

  • Yes
  • No

Other information

React Router 6 apps are unaffected unless they set future.v7_relativeSplatPath, in which case relative links under a splat no longer include the tail. Those apps already had broken relative links in nested outlets in 9.0, so this fixes that too.

The Vercel preview stays on React Router 6, so React Router 7 is only covered in CI.

Relative links test page

Current dev build

9.0.7-dev.11790792026.1963eab3

@ShaneK
ShaneK requested a review from a team as a code owner September 30, 2026 17:34
@vercel

vercel Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ionic-framework Ready Ready Preview Sep 30, 2026 6:10pm UTC

Request Review

@github-actions github-actions Bot added package: core @ionic/core package package: angular @ionic/angular package package: vue @ionic/vue package package: react @ionic/react package labels Sep 30, 2026
"version": "8.5.28",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.28.tgz",
"integrity": "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==",
"version": "8.5.8",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like recent changes were lost in this package-lock update. Postcss should be >=8.5.23 to prevent a security warning from Dependabot.

This branch was successfully deployed

1 active deployment
Preview — 963eab38 Deployed Sep 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package package: react @ionic/react package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants