I am trying to write a simple markdwon previewer. the problem is when I insert the Generated HTML text inside a div in render method like this:
render() {
return (
<div>
{this.state.genHTML}
</div>
);
}
it does not rendered, and displays as it written with its tags just like as if a string.
But with dangerouslySetInnerHTML the Generated HTML is got rendered.
I want to know why this occurs?