JSFiddle - React, Tailwind, and code Playground
HTML
<form name="foo" method="post" action="#">
<input type="file" id="myfile">
</form>
JavaScript
$('#myfile').change(function(e){
console.log($(this).val());
});
<form name="foo" method="post" action="#">
<input type="file" id="myfile">
</form>
$('#myfile').change(function(e){
console.log($(this).val());
});