JSFiddle - React, Tailwind, and code Playground
HTML
<input type="file" name="file" id="file" />
<button id="btn">Submit</button>
<div id="fname"></div>
<input type="file" name="file" id="file" />
<button id="btn">Submit</button>
<div id="fname"></div>