Felix Lee

Photo by Joan Gamell on Unsplash

Came across this warning when using dangerouslySetInnerHTML on ReactJS.

Warning: Prop `dangerouslySetInnerHTML` did not match. Server...

Here is the snippet that causes the problem:

Notice how I set input holding the <p> tag value as string, to a <p> tag on the JSX.

The fix is simple, just change…

--

--

Felix Lee

Felix Lee

Software engineer in Singapore. Write random tech stuff. Still figuring out this “life” thing in life.