JSFiddle - React, Tailwind, and code Playground

HTML

<label>Select All BOM's</label>
<input type="checkbox" id="allboms" name="degbutton"/>

JavaScript

$(document).ready(function rd(){
    var $allboms = $('#allboms');
    
    $allboms.on('change', function ch(){
        if (this.checked) {
            console.log('this.checked is true.');
        }
        
        if ($(this)[0].checked) {
            console.log('$(this)[0].checked is true.');
        }
        
        if ($(this).prop('checked')) {
            console.log('$(this).prop("checked") is true.');
        }
        
        if ($(this).is(':checked')) {
            console.log('$(this).is(":checked") is true.');
        }
    });
});