JSFiddle - React, Tailwind, and code Playground

HTML

<div>test</div>

CSS

div {
    color: red !important;
}

.shown {
    color: blue !important;
}

JavaScript

var thing = $('div')
    
thing.addClass('shown');