Skip to content

fix(theme-common): useLocationChange fire un-necessarily twice - #6070

Merged
slorber merged 1 commit into
mainfrom
slorber/fix-useLocationChange-firing-twice
Dec 8, 2021
Merged

slorber merged 1 commit into
mainfrom
slorber/fix-useLocationChange-firing-twice

Conversation

@slorber

@slorber slorber commented Dec 8, 2021

Copy link
Copy Markdown
Collaborator

Motivation

Fix little issue reported by @lex111 here: #5714 (comment)

The useLocationChange always fires again on the very first re-render

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

preview (tried to write tests but ReactRouter makes this quite hard, <StaticRouter> can't update location :s

@slorber slorber added the pr: bug fix This PR fixes a bug in a past release. label Dec 8, 2021
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Dec 8, 2021
@netlify

netlify Bot commented Dec 8, 2021

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Dec 8, 2021

Copy link
Copy Markdown

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 97
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-6070--docusaurus-2.netlify.app/

@github-actions

github-actions Bot commented Dec 8, 2021

Copy link
Copy Markdown

Size Change: +7 B (0%)

Total Size: 657 kB

ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/globalData.json 40.1 kB 0 B
website/build/assets/css/styles.********.css 101 kB 0 B
website/build/assets/js/main.********.js 486 kB +7 B (0%)
website/build/index.html 29.3 kB 0 B

compressed-size-action

@slorber
slorber merged commit f5a404b into main Dec 8, 2021
@slorber
slorber deleted the slorber/fix-useLocationChange-firing-twice branch December 8, 2021 15:38
mrizwanashiq pushed a commit to mrizwanashiq/docusaurus that referenced this pull request Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants