JSFiddle - React, Tailwind, and code Playground

HTML

<form>
    <input type="file"/>
    <button type="reset" id="file_reset" style="display:none"></button>
</form>

<br><br>
Note that this button is outside the form. You can replace it with any event/action.
<br>
<button type="button" id="some_action">Clear Form</button>

JavaScript

$('#some_action').on('click', function(){
    $('#file_reset').trigger('click');
});