JSFiddle - React, Tailwind, and code Playground

HTML

<div id="myDiv" >some contents</div>

JavaScript

alert("About to assign desired html");
$('#myDiv').html('<h1>test</h1>');

alert($('#myDiv').html());