Skip to content

feat(react-router): upgrade to react router 6#30831

Open
ShaneK wants to merge 116 commits intomajor-9.0from
sk/react-router-6
Open

feat(react-router): upgrade to react router 6#30831
ShaneK wants to merge 116 commits intomajor-9.0from
sk/react-router-6

Conversation

@ShaneK
Copy link
Member

@ShaneK ShaneK commented Dec 2, 2025

Issue number: resolves #24177


What is the current behavior?

Currently, Ionic Framework React Router only supports React Router 5. This has many issues and unsupported/broken features.

What is the new behavior?

With this change, Ionic Framework will support React Router 6 while still supporting transitions in the same way a native app does.

Most of what caused this change to take a long time is that React Router 5 and React Router 6 have fundamental differences in how they handle components once they're no longer part of the view. In this change, we move away from relying on React Router directly so much and have our own implementation for deciding how views get dealt with during navigation and when they're cleaned up, allowing for us to still transition between them like we need to while still using React Router as much as we possibly can.

This change will also lay the foundation for the migration to React Router 7, which will ideally be easier since most of the hard work has been dealt with here.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Current dev build (last updated 2025-12-18):

⚠️ WARNING: If you're going to use this dev build on an existing react project, you'll need to migrate to React Router 6. Migrating a large project at this point might be a bad idea since this will not release until v9, which will require further migrations and have other breaking changes! I do not currently have migration documentation for this, but it's a relatively easy process from the migrations I've been doing.

8.8.1-dev.11773168858.1f9c0eb8

thetaPC and others added 30 commits May 8, 2025 14:49
Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
…ter 6

Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
…ct router 6

Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
… router 6

Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
Copy link
Member

@brandyscarney brandyscarney left a comment

Choose a reason for hiding this comment

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

Woooooooo! 🚀

Copy link
Contributor

Choose a reason for hiding this comment

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

Found an issue with active styles on the tab buttons when navigating from root.

Screen.Recording.2026-01-07.at.9.44.39.AM.mov

Copy link
Member Author

Choose a reason for hiding this comment

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

I cannot reproduce this one at all at this point, but believe it's possible it was fixed in some of my navigation fixes plus the tab fix from a while back that went into main and fixed up how tabs were updating their active state in Ionic Framework Core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: react @ionic/react package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants