-
Notifications
You must be signed in to change notification settings - Fork 401
Closed
Labels
Description
Version
Latest ^6.0.0
Steps to reproduce
Using the library on NextJS
Expected Behavior
Avoid useLayoutEffect wairning
Warning: useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output form
..
ref :
- 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. #753
- useLayoutEffect in ssr facebook/react#14927
- https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85