JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" name="yousendit" id="yousendit" value="1" />
JavaScript
document.getElementById('yousendit').onclick = function() {
if (this.checked==true)
alert('checked');
}