Repository navigation
fix(theme-common): do not run useLocationChange when hot reloading - #6696
Conversation
|
✔️ [V2] 🔨 Explore the source changes: 469fce0 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/620d7ff4cdfa150007250794 😎 Browse the preview: https://deploy-preview-6696--docusaurus-2.netlify.app |
|
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-6696--docusaurus-2.netlify.app/ |
|
Size Change: +3 B (0%) Total Size: 781 kB ℹ️ View Unchanged
|
|
This was extremely annoying when iterating locally on docs. Thank you for this fix! I applied it manually and look forward to upgrading to the Docusaurus beta that will include it 🙌🏻 cc @slumbering |
Josh-Cena
left a comment
There was a problem hiding this comment.
This has been annoying for me as well. Glad you found the fix!
Motivation
Just noticed that we have the problem described in the issue again > #4794
This is still caused by the SkipContent component, but actually because the useLocationChange hook was triggered when it was not expected (changed doc -> hot reload -> re-render, but in fact the current location has not changed).
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Related PRs