Skip to content
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 useLayoutEffect warning when server rendering #4586

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

rakyi
Copy link
Contributor

@rakyi rakyi commented Feb 21, 2025

We get warnings in the admin dev server.

It seems we don't really need useLayoutEffect and can use useEffect instead.

https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85

@rakyi rakyi requested a review from ikesau February 21, 2025 12:21
@owidbot
Copy link
Contributor

owidbot commented Feb 21, 2025

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs

Login: ssh owid@staging-site-fix-use-layout-effect-warnin

SVG tester:

Number of differences (default views): 0 ✅
Number of differences (all views): 0 ✅

Edited: 2025-02-21 12:38:37 UTC
Execution time: 1.25 seconds

@rakyi rakyi merged commit 4384824 into master Feb 21, 2025
36 checks passed
@rakyi rakyi deleted the fix-use-layout-effect-warning branch February 21, 2025 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants