← React Intermediate Questions - Set 3 Q30
What is the significance of `dangerouslySetInnerHTML` in React?
React Intermediate Questions - Set 3
Example
1
<div dangerouslySetInnerHTML={{ __html: sanitizedHtml }} />
What to notice
- The name is the warning: only with HTML you sanitised (DOMPurify), never with user input raw.
← Back to the question list