JSFiddle - React, Tailwind, and code Playground
HTML
<section>
<div class="should_be_replaced">something</div>
</section>
JavaScript
$( ".should_be_replaced" ).click(function() {
var str = "<b>title</b><p>sth <span>sss</span></p>";
$("section").html(str);
});