【发布时间】:2021-01-12 16:29:05
【问题描述】:
我在 Next.js 应用程序中使用 react-tooltip 库。
我注意到每次我在访问使用工具提示的页面时刷新网站时都会收到错误消息:
react-dom.development.js:88 Warning: Prop `dangerouslySetInnerHTML` did not match.
客户端和服务器端的 CSS 类不同
奇怪的是,从随机页面导航到使用 react-tooltip 的页面时,我没有收到该错误。
tooltip相关代码:
<StyledPopularityTooltipIcon src="/icons/tooltip.svg" alt="question mark" data-tip="hello world" />
<ReactTooltip
effect="solid"
className="tooltip"
backgroundColor="#F0F0F0"
arrowColor="#F0F0F0"
clickable={true}
/>
【问题讨论】:
标签: css reactjs next.js server-side-rendering