JSFiddle - React, Tailwind, and code Playground
HTML
<div id="box">
</div>
<div id="">
</div>
CSS
#box {
width: 150px;
height: 150px;
border: 1px solid black;
}
JavaScript
var box = document.getElementById("box");
box.addEventListener("mouseover", function() {box.style.background = "red"});
box.addEventListener("mouseout", function() {box.style.background = "white"});