JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" value="true" />
JavaScript
alert($("input:checked").val());
$("input").change(function() {
alert($("input:checked").val());
});
<input type="checkbox" value="true" />
alert($("input:checked").val());
$("input").change(function() {
alert($("input:checked").val());
});