JSFiddle - React, Tailwind, and code Playground

HTML

check all/none: <input type = "checkbox" id = "check_all_none"></input>
<br/>
<input type = "checkbox" class = "others"></input><br/>
<input type = "checkbox" class = "others"></input>

JavaScript

$('#check_all_none').change(function () {
    if ( $(this).is(':checked') ){
        $('.others').attr("checked", true);
    }
    else{
        $('.others').removeAttr("checked");
    }

});