JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" class="treecheck"/>
<input type="checkbox" class="treecheck"/>
<input type="checkbox" class="treecheck"/>
<input type="checkbox" class="treecheck"/>
<input type="checkbox" class="treecheck"/>
JavaScript
$('.treecheck').on('change', function() {
alert("ok")
$('.treecheck').not(this).prop('checked', false);
});