-
-
Notifications
You must be signed in to change notification settings - Fork 528
[BUG] useLayoutEffect warning in dev mode #954
Copy link
Copy link
Closed
Labels
Description
Describe the bug
When using react-tooltip, there is a useLayoutEffect warning, although the tooltip itself works fine.
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.
at he (/Users/joulev/dev/www/debug/node_modules/.pnpm/react-
tooltip@5.8.1_biqbaboplfbrettd7655fr4n2y/node_modules/react-tooltip/dist/react-
tooltip.cjs.min.js:15:3103)
at exports.Tooltip (/Users/joulev/dev/www/debug/node_modules/.pnpm/react-
tooltip@5.8.1_biqbaboplfbrettd7655fr4n2y/node_modules/react-tooltip/dist/react-
tooltip.cjs.min.js:15:7943)
...
Version of Package
v5.8.1
To Reproduce
- Clone https://github.com/joulev/debug/tree/react-tooltips-uselayouteffect-warning
pnpm installpnpm dev- Above warning is shown.
Expected behavior
No warning should be shown.
Screenshots
N/A
Additional context
The repro repo uses Next.js 13, but this one is different from #933 as I have disabled SWC minification.
Reactions are currently unavailable