-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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(gatsby): update location state when location.key changes #18039
fix(gatsby): update location state when location.key changes #18039
Conversation
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.
We can return location state as key always changes.
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 @universse, change looks great! Thanks for the investigation and fixing this! We can return location state as key always changes.
I was overly cautious there. Thanks for reviewing! |
Description
The component are ignoring updates to
props.location
when anything other thanprops.location.href
changes.Also, the discrepancy in behavior between dev and prod, as mentioned in #17960, is due to the difference in the way location is passed in
LocationHandler
.I wonder what the rationale was for this.
Related Issues
#17960