JSFiddle - React, Tailwind, and code Playground
HTML
<tr>
<td>Principal:</td>
<td colspan="2">
<input type="checkbox" id="a_principal" name="a_principal" value="true"/>
</td>
</tr>
JavaScript
$(function (){
if($('#a_principal').val()== "true"){
$("input:checkbox").prop('checked',true);
}else{
$("input:checkbox").prop('checked', false);
}
});