fix(react): Nav unmounts component while invoking popTo or popToRoot#27821
Merged
averyjohnston merged 2 commits intoionic-team:mainfrom Sep 20, 2023
Merged
fix(react): Nav unmounts component while invoking popTo or popToRoot#27821averyjohnston merged 2 commits intoionic-team:mainfrom
averyjohnston merged 2 commits intoionic-team:mainfrom
Conversation
|
|
sean-perkins
approved these changes
Sep 19, 2023
Contributor
sean-perkins
left a comment
There was a problem hiding this comment.
Thank you for this contribution!
I ended up checking out your branch and pushing some changes to avoid an API change to the ReactDelegate. We can create a unique id for each delegate constructed and increment a counter for each view pushed onto the stack.
I've also updated the test app to check that the page unmounted lifecycle is called when popping to the root of the stack.
Once we have another +1 from the team, this is good to go 🎉
averyjohnston
approved these changes
Sep 20, 2023
Contributor
|
Thank you! |
liamdebeasi
pushed a commit
that referenced
this pull request
Sep 22, 2023
…27821) Issue number: Resolves #27798 --------- ## What is the current behavior React IonNav component's views are missing keys, leading to unnecessary duplicate mounting of components. ## What is the new behavior? - Adds key to views of React IonNav component. ## Does this introduce a breaking change? - [ ] Yes - [x] No --------- Co-authored-by: Sean Perkins <sean@ionic.io>
liamdebeasi
pushed a commit
that referenced
this pull request
Sep 26, 2023
…27821) Issue number: Resolves #27798 --------- ## What is the current behavior React IonNav component's views are missing keys, leading to unnecessary duplicate mounting of components. ## What is the new behavior? - Adds key to views of React IonNav component. ## Does this introduce a breaking change? - [ ] Yes - [x] No --------- Co-authored-by: Sean Perkins <sean@ionic.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue number: Resolves #27798
What is the current behavior
React IonNav component's views are missing keys, leading to unnecessary duplicate mounting of components.
What is the new behavior?
Does this introduce a breaking change?