JSFiddle - React, Tailwind, and code Playground

HTML

<label for="all">ALL<input id="chkAll" class="chk_select_all" type="checkbox" /><br>
<label for="chk1">1<input id="chk1" type="checkbox" class="chk_group" /><br>
<label for="chk2">2<input id="chk2" type="checkbox" class="chk_group" /><br>
<label for="chk3">3<input id="chk3" type="checkbox" class="chk_group" /><br>
<label for="chk4">4<input id="chk4" type="checkbox" class="chk_group" /><br>

JavaScript

$(document).ready(function(){
   
    $(".chk_select_all").click(function(){
       $(".chk_group").attr('checked', this.checked); 
    });
    
});