Nextjs-使用类型电子邮件时输入水合错误



这里有一个奇怪的问题,有人知道为什么我在输入中使用某种类型的电子邮件时会出现水合错误吗?这似乎也只发生在萤火虫身上?

const Input = ({ type = 'text' }) => {
return <input type={type} />
}
export default function Page() {
return (
<>
<Input type="email" />
</>
)
}
Error: Hydration failed because the initial UI does not match what was rendered on the server.
See more info here: https://nextjs.org/docs/messages/react-hydration-error

其他类型如密码不会返回错误,只是电子邮件?

这似乎是Next.js中的一个错误;我在这里报道过:https://github.com/vercel/next.js/issues/44644

编辑:看起来问题是浏览器扩展在电子邮件输入字段中添加了一些内容,比如Firefox Relay或DDG Privacy Essentials。卸载这些或禁用图标以解决此问题。

相关内容

最新更新