-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Closed
Closed
Copy link
Labels
package: react@ionic/react package@ionic/react packagetype: buga confirmed bug reporta confirmed bug report
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v7.x
Current Behavior
Hi,
I use IonNav in react, invoking popTo lead to component mount twice.
- Each element in IonNav views not have key —— https://github.com/ionic-team/ionic-framework/blob/main/packages/react/src/components/navigation/IonNav.tsx#L22
- Each view is wrapped by Portal —— https://github.com/ionic-team/ionic-framework/blob/main/packages/react/src/framework-delegate.tsx#L25
- Page A => Page B => Page C => Page D, from Page D popTo Page B. Page D would unmount, then mount agin, finally unmount, It causes to make multiple initialization requests of Page D.
Expected Behavior
Page D unmount only once.
Steps to Reproduce
- Build a IonNav and four page - Page A, Page B, Page C, Page D;
- Push page one by one;
- popTo Page B from Page D;
Code Reproduction URL
https://stackblitz.com/edit/stackblitz-starters-zcyaaq
Ionic Info
Ionic:
Ionic Framework : @ionic/react 7.1.2
System:
NodeJS : v16.19.1
npm : 8.19.3
OS : macOS
Additional Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
package: react@ionic/react package@ionic/react packagetype: buga confirmed bug reporta confirmed bug report