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 mismatch of useIsomorphicLayoutEffect logic #61

Merged
merged 1 commit into from
Apr 8, 2021

Conversation

baybara-pavel
Copy link
Contributor

After react-collapsed update we get warning in Next.js log:
Warning: 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. See https://reactjs.org/link/uselayouteffect-ssr for common fixes.

The reason in broken condition result

After react-collapsed update we get warning in Next.js log:
Warning: 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. See https://reactjs.org/link/uselayouteffect-ssr for common fixes.

The reason in broken condition result
@roginfarrer roginfarrer merged commit 0c2e343 into roginfarrer:main Apr 8, 2021
@roginfarrer
Copy link
Owner

Thanks!

@roginfarrer
Copy link
Owner

Published in 3.0.2

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.

None yet

2 participants