报错:Hydration failed because the initial UI does not match what was rendered on the server.
解决:
水化错误可能发生在:
错误的HTML标签嵌套
嵌套在另一个<p>
标签中的<p>
<div>
嵌套在<p>
标签中
<ul>
或<ol>
嵌套在<p>
标记中
交互式内容不能嵌套(<a>
嵌套在<a>
标签中,<button>
嵌套在<button>
标签中,等等)
Hydration errors can occur from:
Incorrect nesting of HTML tags
<p>
nested in another <p>
tag
<div>
nested in a <p>
tag
<ul>
or <ol>
nested in a <p>
tag
Interactive Content cannot be nested (<a>
nested in a <a>
tag, <button>
nested in a <button>
tag, etc)