-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
fix: keep hash/fragment section for initial render #11078
Conversation
✅ Deploy Preview for react-navigation-example ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
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.
Thanks for the PR. I think we should also preserve the hash on URL updates (if the screen didn't change). For now, we could only check if the path
didn't change and preserve the hash.
Can you move this logic to history.replace
function where it preserves the hash if path is the same?
@satya164 force pushed a fix that works no as you described and in History.replace |
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.
Thank you
**Motivation** Fixes this issue that I discovered #11026 **Test plan** 1. Run the example 2. Visit http://localhost:19006/simple-stack/article/gandalf#test 3. The with #test part still exists 4. Note that if you change the hash it will be gone (this is expected)
**Motivation** Fixes this issue that I discovered #11026 **Test plan** 1. Run the example 2. Visit http://localhost:19006/simple-stack/article/gandalf#test 3. The with #test part still exists 4. Note that if you change the hash it will be gone (this is expected)
**Motivation** Fixes this issue that I discovered #11026 **Test plan** 1. Run the example 2. Visit http://localhost:19006/simple-stack/article/gandalf#test 3. The with #test part still exists 4. Note that if you change the hash it will be gone (this is expected)
Motivation
Fixes this issue that I discovered #11026
Test plan