JSFiddle - React, Tailwind, and code Playground

HTML

<input type="file" name="file_test" />
<input type="text" id="test_text_box"/>

JavaScript

$("input[type=file]").change(function() {
          var filename = $(this).val().replace(/^C:\\fakepath\\/i, '');
          $("#test_text_box").val(filename);
 });