JSFiddle - React, Tailwind, and code Playground
HTML
<div id="content" style="display: none">
Page content.
</div>
<div id="loading" style="display: block">
Loading! Please calm down guy...
</div>
JavaScript
// Just to simulates loading delay.
var i = setInterval(function () {
clearInterval(i);
// The desired code is only this:
document.getElementById("loading").style.display = "none";
document.getElementById("content").style.display = "block";
});