JSFiddle - React, Tailwind, and code Playground

HTML

<div id="sample" ></div>

CSS

#sample{
                width:100px; 
                height:100px;
                background-color:red;
               }
 .green{ 
               background-color:green !important;
               }

JavaScript

$( document ).ready(function() {
   window.setTimeout(function(){
        $('#sample').addClass("green");
        }, 2000)
});