JSFiddle - React, Tailwind, and code Playground
HTML
<div id="mydiv">
<div id="two">some text</div>
</div>
JavaScript
$("#mydiv").empty();
$("#two").text("sssss text");
$("#mydiv").text("another text");
<div id="mydiv">
<div id="two">some text</div>
</div>
$("#mydiv").empty();
$("#two").text("sssss text");
$("#mydiv").text("another text");