select
select copied to clipboard
Next.js 中 使用 Select 组件 mode="multiple",报警告 Warning: useLayoutEffect does nothing on the server......
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 this is actually caused by react-component/overflow. Please upvote the corresponding issue there 🙂