dangerouslySetInnerHTML does not render server side with getStaticProps #13313
-
Hey folks, I've been struggling with an issue which I'm not sure if it is the expected behavior.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
|
Beta Was this translation helpful? Give feedback.
-
Note that this comment doesn't related to original author's situation. I just write it because I've lost for similar issue. Anybody who experience this pheonmena must check the HTML content when host element is const someHtml = '<p>blah</p>'
return (
<p dangerouslySetInnerHTML={{ __html: someHtml }}
) Note that |
Beta Was this translation helpful? Give feedback.
dangerouslySetInnerHTML
is set on server-side also. It could be as simple as your data or a if statement before thedangerouslySetInnerHTML
is not available true on server-side? Is your data only available after useEffect?