Warning: Expected server HTML to contain a matching <div> in <header>.

这个疑难杂症对应的问题很多 不同标签对应着不同的不能匹配的对,时间关系暂时把next.js报错弹框隐藏,'use client'有时可以解决问题有时不行, 在Root组件中用不了。另一个办法是用suppressHydrationWarning,但是不确定到底用在哪一个上

next.js - I want to hide the error overlay in Nextjs - Stack Overflow

reactjs - React 18: Hydration failed because the initial UI does not match what was rendered on the server - Stack Overflow

Logo

一站式 AI 云服务平台

更多推荐