Render HTML in React.js

Use the dangerouslySetInnerHTML property:

<div dangerouslySetInnerHTML={{ __html: '<here goes the HTML content to render as is' }} />

You can create a reusable component for rendering HTML in React.js

const RawHTML = ({children, className = ""}) =>
  <div className={className} dangerouslySetInnerHTML={{ __html: children }} />

Subscribe to My Newsletter

The latest programming-related news, articles and resources - sent to your inbox monthly. Unsubscribe anytime.