JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" name="hulk"/> Check / Uncheck All <br />
<input type="checkbox" name="hulkSub"/> Overlay 1 <br />
<input type="checkbox" name="hulkSub"/> Overlay 2 <br />
JavaScript
$('input[name="hulk"]').click(function(){
$(this).nextAll('input[name="'+this.name+'Sub"]').prop('checked',this.checked);
});