JSFiddle - React, Tailwind, and code Playground

HTML

<div ><input type="file" name="photo" id="photo" /></div>

JavaScript

$('#photo').change(function(e) {
$(this).trigger('click');
  alert("change fun");
});