JSFiddle - React, Tailwind, and code Playground

HTML

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

JavaScript

$(function() {
    $("#file").click();
});