In my Next.js app, I make use of the react-tooltip library for tooltips.
One peculiar issue that I have noticed is that whenever I refresh a page containing a tooltip, I encounter the following error:
react-dom.development.js:88 Warning: Prop `dangerouslySetInnerHTML` did not match.
The inconsistency arises from differences in CSS classes between client and server sides.
Interestingly, this error does not occur when moving from a different page to one with the react-tooltip component.
Here is the snippet of code relevant to the tooltip:
<StyledPopularityTooltipIcon src="/icons/tooltip.svg" alt="question mark" data-tip="hello world" />
<ReactTooltip
effect="solid"
className="tooltip"
backgroundColor="#F0F0F0"
arrowColor="#F0F0F0"
clickable={true}
/>