JSFiddle - React, Tailwind, and code Playground
HTML
<button id="check">Check it</button>
<button id="uncheck">Uncheck it</button>
And try checking/unchecking directly: <input id="chk" type="checkbox">
JavaScript
$('#check').on('click', function() {
$('#chk').prop('checked', true).trigger('change');
});
$('#uncheck').on('click', function() {
$('#chk').prop('checked', false).trigger('change');
});
$('input').on('change', function() {
$('body').append($('<p/>').text('changed'+' '+$(this).is(':checked')));
});