JSFiddle - React, Tailwind, and code Playground

HTML

<input type="checkbox" id="chk" class="cchk" />

JavaScript

(function (){
    $('.cchk').change(function(){
    
    	alert("hi");
    })
}());