Open
Description
Describe the bug
Getting a warning in my project:
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://fb.me/react-uselayouteffect-ssr for common fixes.
Links to this:
https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
Unsure if this is a problem or not.
Reproduction
Create a react app and add a simple carousel.
System Info
System:
OS: macOS 13.4
CPU: (10) arm64 Apple M1 Pro
Memory: 52.91 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 16.19.0 - ~/.nvm/versions/node/v16.19.0/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 8.19.3 - ~/.nvm/versions/node/v16.19.0/bin/npm
Browsers:
Edge: 112.0.1722.68
Firefox Developer Edition: 113.0
Safari: 16.5
npmPackages:
@trendyol-js/react-carousel: ^3.0.2 => 3.0.2
Used Package Manager
npm
Logs
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://fb.me/react-uselayouteffect-ssr for common fixes.
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
No labels