JSFiddle - React, Tailwind, and code Playground

HTML

<input name="file" type="file" />

JavaScript

$('input[name=file]').change(function() {
   alert($(this).val()); 
});