Skip to content

fix(react-router): show page that mounts during a navigation - #31718

Open
ShaneK wants to merge 2 commits into
mainfrom
FW-7955
Open

ShaneK wants to merge 2 commits into
mainfrom
FW-7955

Conversation

@ShaneK

@ShaneK ShaneK commented Nov 9, 2026

Copy link
Copy Markdown
Member

Issue number: resolves #31696


What is the current behavior?

Currently, a page that mounts in the same render as a navigation registers with the previous pathname, since the outlet's route info catches up a render later. If a sibling catch-all route matched that old path, the page gets attached to the catch-all's view and hidden along with it, so the screen goes blank. Logging out and navigating in the same click is the usual way to hit it.

What is the new behavior?

Each view now passes itself to registerIonPage, and the outlet uses that view when the path lookup picks a different one. When the two agree nothing changes, so the fix for #28878 still works. The new parameter on StackContextState.registerIonPage in @ionic/react is optional, so existing callers are unaffected.

Does this introduce a breaking change?

  • Yes
  • No

Other information

The new test fails without this change. It also runs a layout with no catch-all, because always trusting the owning view broke that case about half the time.

@ShaneK
ShaneK requested a review from a team as a code owner November 9, 2026 19:48
@ShaneK
ShaneK requested a review from brandyscarney November 9, 2026 19:48
@vercel

vercel Bot commented Nov 9, 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 Nov 9, 2026 7:57pm UTC

Request Review

@thetaPC thetaPC left a comment

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.

LGTM

This branch was successfully deployed

1 active deployment
Preview — bb548e0c Deployed Nov 9, 2026 by vercel[bot]
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.

bug: react-router, page that mounts during navigation is hidden when a sibling catch-all route matched the previous pathname

2 participants