JSFiddle - React, Tailwind, and code Playground

HTML

<input type="file">

JavaScript

$('input[type="file"]').on('change', function() {
    $(this).val('');
});