JSFiddle - React, Tailwind, and code Playground

HTML

<div id="section1">
 <label> Label 1 </label>
 <br>
     <input type="text" id="input_section1"/>
 <button type="reset" class="clear">Reset</button>
</div>
<div id="section2">
 <label> Label 1 </label>
 <br>
     <input type="text" id="input_section2"/>
 <button type="reset" class="clear">Reset</button>
</div>

JavaScript

$(document).on('click','.clear',function(){
    $(this).siblings( "input" ).val('');
})