What is the non-jsx equivalent of the dangerous SetInnerHTML?

I am working on a tutorial , but trying to avoid jsx and use the virtual DOM manually. How to make an equivalent

<span dangerouslySetInnerHTML={{__html: rawMarkup}} /> 
+8
syntax reactjs
source share
1 answer

Found the answer by connecting to the source code:

 React.DOM.div({ dangerouslySetInnerHTML: { __html: markdown.makeHtml(this.props.children.toString()) } }); 

or in coffeescript:

  R.div dangerouslySetInnerHTML: __html: markdown.makeHtml @props.children.toString() 
+15
source share

All Articles