select icon indicating copy to clipboard operation
select copied to clipboard

Next.js 中 使用 Select 组件 mode="multiple",报警告 Warning: useLayoutEffect does nothing on the server......

Open mrzhouxu opened this issue 4 years ago • 1 comments

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.

我看到源码中有重定义 useLayoutEffect ,似乎是用来解决 SSR 中这个警告问题的,但是好像并没有解决问题

mrzhouxu avatar Mar 23 '21 10:03 mrzhouxu

@mrzhouxu this is actually caused by react-component/overflow. Please upvote the corresponding issue there 🙂

lgenzelis avatar May 01 '21 00:05 lgenzelis