question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning: Prop `dangerouslySetInnerHTML` did not match.

See original GitHub issue

Hey!

This code,

   <ReactTooltip
      effect="solid"
      place="bottom"
      delayShow={200}
      arrowColor="transparent"
      backgroundColor="#1d2c3e"
      id="newApp"
   >
      <h1 className="text-sm text-white font-medium">Upload</h1>
   </ReactTooltip>

Seems to be giving me this: image

I’ve tried to use <p> tags instead of <h1> and so on, but I can’t seem to get rid of it. I do indeed have custom CSS on it, and it looks like this:

.__react_component_tooltip {
  border-radius: 5px !important;
  border: 1px solid #273552 !important;
  background: #404f6d !important;
  padding: 10px 15px !important;
  color: #b7c4dc !important;
  z-index: 100 !important;
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:13
  • Comments:12

github_iconTop GitHub Comments

61reactions
LeonSkrileccommented, Apr 22, 2021

I was having same problems with Next.js. I just imported component dynamically, with SSR disabled and it works.

import dynamic from "next/dynamic";

const ReactTooltip = dynamic(() => import("react-tooltip"), {
  ssr: false,
});
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix the `dangerouslySetInnerHTML` did not match ...
I was trying to print the HTML contained in a prop, using dangerouslySetInnerHTML ... Warning: Prop `dangerouslySetInnerHTML` did not match.
Read more >
Warning: Prop `dangerouslySetInnerHTML` did not match. ...
It works, but I got this warning even if any option is passed.
Read more >
reactjs - What is happening such I receive ...
Material-UI have a prop called component. use component as div ... so the HTML structure no longer matches the client rendered html hence ......
Read more >
Fix Prop dangerouslySetInnerHTML did not match - Felix Lee
Came across this warning when using dangerouslySetInnerHTML on ReactJS. Here is the snippet that causes the problem: Notice how I set input holding...
Read more >
15 Warning: Prop dangerouslySetInnerHTML did not match.
Chapter Fifteen: Fix Prop dangerouslySetInnerHTML did not match In Next.jswarning: prop href did not match server client nextjs, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found