Closed
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-
[email protected]_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-
[email protected]_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 install
pnpm 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.