JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" id="check" >check it</input>
JavaScript
$("#check").change( function(){
if( $(this).is(':checked') ) {
alert("checked");
}else{
alert("unchecked");
}
});