JSFiddle - React, Tailwind, and code Playground

HTML

<p class="foo">foo</p>

CSS

.foo{color:red;};

JavaScript

$(document).ready(function() {
    $('.foo').click(function() {
        $(this).removeClass('foo');
        alert( 'Class .foo should have been removed. Why is this alert still appearing?' );       
    });             
});