Skip to content

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.7.13-dev.11766090775.11e2bebb

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.

Looking really good! 🚀 My comments are mostly questions & potential issues with either the test app or the router code.

…RouterOutlet (#30844)

Issue number: resolves [an issue from a
comment](#24177 (comment))

---------

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Currently, Ionic's RR6 doesn't support relative routes in the same way
RR6 does. Routes that do not start with a `/`do not work in the Ionic
RR6 implementation in some cases.

## What is the new behavior?

With this change, we properly support these route styles and more
closely align with normal RR6 route support.

## Does this introduce a breaking change?

- [ ] Yes
- [X] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

Current dev build:
```
 8.7.12-dev.11765307927.1f491e92
```

This PR will be merged into the RR6 branch, which will be squash+merged
into the major 9 branch. This will prevent major 9 from having commits
in the change log on release that reference fixing things that are only
available in major 9.
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.

It would be great to add a not on Page 3 that using the back button will navigate the user to Page 1. I had to check the code to verify what the expected result should be. By adding a note, we can quickly determine what the end result should be,

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 where the active styles are not matching when using the buttons. Notice in the video that both tab buttons have active styles.

Screen.Recording.2026-01-05.at.5.03.13.PM.mov

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 that the URL and page doesn't match when also using the browser back buttons. My example uses list #1 but it also happens for any list item.

Screen.Recording.2026-01-05.at.4.56.59.PM.mov

Copy link
Contributor

Choose a reason for hiding this comment

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

What's the point of this page? I'm not following the importance. It would be great to add a note to make it easier for testing.

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 Child 2 not rendering the right page when using the browser's buttons. The same for Child 1.

Screen.Recording.2026-01-05.at.5.20.06.PM.mov

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm seeing an issue with active styles on the tab buttons.

Screen.Recording.2026-01-05.at.5.23.45.PM.mov

Copy link
Contributor

Choose a reason for hiding this comment

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

Pages and URLs do not match when using the browser's buttons.

Screen.Recording.2026-01-05.at.5.25.18.PM.mov

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 the toolbar overlapping when using the browser's buttons.

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

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 page and URL not matching when navigating from root.

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

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 page and URL not matching when using browser's buttons.

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

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
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 page and URL not matching when using the browser's buttons from root. Also there's a flicker of the root page during navigation.

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

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 page and URL not matching when using the browser's buttons.

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I removed the items from the list. When I use the browser's back button, I eventually see the list filled with the deleted items. I would expect the list to be deleted. What is the correct expectation?

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

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.

5 participants