JSFiddle - React, Tailwind, and code Playground

HTML

<div id="test">
    Some text.
</div>

<br />
<hr />

<button id="button">Click</button>

<p>Clicking the button should make "Some text." appear.<br /><br />In Chromium this does not occur unless the div#test element is being observed from the developer tools inspector or if the div is logged from JavaScript. It will also work if you use <code>div.style.removeProperty("display")</code>.</p>

JavaScript

function removeStyle() {
    var div = document.getElementById("test");
    div.removeAttribute("style");
    //div.style.removeProperty("display");
}

var button = document.getElementById("button");
button.addEventListener("click", removeStyle, false);

var div = document.getElementById("test");
div.style.display = "none";