-
Notifications
You must be signed in to change notification settings - Fork 13.4k
feat(react-router): upgrade to react router 6 #30831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: major-9.0
Are you sure you want to change the base?
Conversation
Co-authored-by: Sean Perkins <[email protected]>
…ter 6 Co-authored-by: Sean Perkins <[email protected]>
…ct router 6 Co-authored-by: Sean Perkins <[email protected]>
… router 6 Co-authored-by: Sean Perkins <[email protected]>
2929474 to
ab3dde2
Compare
brandyscarney
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woooooooo! 🚀
There was a problem hiding this comment.
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,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, done! 54979f9
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good find! The button styles weren't really the issue here, but a symptom of an issue (only on Firefox though, weirdly) where pages were being hidden when their replacements weren't ready yet. Fix is in 12f0d5e
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
210331f
The point of this page is to make sure that classes added by the framework stick around when they're changed dynamically (e.g. ion-page and can-go-back if you didn't load the page directly but navigated to it from /). Brandy actually found a bug thanks to this page in an earlier review.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
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?
Other information
Current dev build (last updated 2025-12-18):