JSFiddle - React, Tailwind, and code Playground
HTML
<label>
<input type="checkbox" id="checkbox"> Click here
</label>
<input type="text" id="test" value="0"/> clicks
JavaScript
$(document).ready(function(){
$('label').click(function(event) {
$('#test').val(parseInt($('#test').val())+1);
event.preventdefault();
});
});