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

useLayoutEffect warning #8

Closed
samantha-wong opened this issue Jun 6, 2020 · 4 comments · Fixed by #9
Closed

useLayoutEffect warning #8

samantha-wong opened this issue Jun 6, 2020 · 4 comments · Fixed by #9
Labels
bug Something isn't working

Comments

@samantha-wong
Copy link

Hi I'm getting this error when using react-compare-slider on my nextjs project :

useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client.

@nerdyman
Copy link
Owner

nerdyman commented Jun 6, 2020

Hi @samantha-wong, thanks for reporting the issue!

I'll look at getting a fix in.

@nerdyman
Copy link
Owner

nerdyman commented Jun 7, 2020

@samantha-wong This has been fixed in 1.0.4, feel free to reopen the issue if it's still a problem.

@samantha-wong
Copy link
Author

@nerdyman Thanks for fixing it so quickly! It's being used here if you're interested: https://pory.io :)

@nerdyman
Copy link
Owner

nerdyman commented Jun 8, 2020

@samantha-wong No problem at all! Thanks for sharing the link, it's awesome to see it in the wild 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants