How to display javascript/html code in react.js render.
I have tried like this
var thisIsMyCopy = '<p>copy copy copy <strong>strong copy</strong </p>';
return (
<div>
<div dangerouslySetInnerHTML={{__html: thisIsMyCopy}}>
</div>
</div>
)
This is html code.. but i also want to display javascript code on my screen... how i can do that.. Can you guide me.. how to proceed with it
dangerouslySetInnerHTML. I recommend you stop right away.