Skip to content

Conversation

@ShaneK
Copy link
Member

@ShaneK ShaneK commented Dec 12, 2025

Issue number: resolves #28878


What is the current behavior?

When a React component conditionally renders different IonPage structures based on state (e.g., a list view vs. an empty state view), and a state change happens simultaneously with navigation, the wrong view is displayed. The URL shows the correct destination route, but the stale/orphaned IonPage from the re-rendered component remains visible instead. Additionally, swipe-to-go-back gestures fail to properly unmount the leaving view, causing pages to remain in the DOM and preventing correct navigation.

What is the new behavior?

When an IonPage registration occurs for a route we're navigating away from, and the new page has a different data-pageid than the existing page element, the registration is rejected. The orphaned page is hidden and scheduled for removal, ensuring the correct destination view is displayed. Cross-outlet swipe back now works correctly by searching all outlets when the target view isn't found in the current outlet.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Current dev build:

8.7.13-dev.11765829391.14bc580c

@ShaneK ShaneK requested a review from a team as a code owner December 12, 2025 20:00
@ShaneK ShaneK requested review from thetaPC and removed request for a team December 12, 2025 20:00
@vercel
Copy link

vercel bot commented Dec 12, 2025

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

Project Deployment Review Updated (UTC)
ionic-framework Ready Ready Preview, Comment Dec 15, 2025 8:07pm

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.

2 participants