JSFiddle - React, Tailwind, and code Playground

HTML

<div class='user-photo'>
    <img src='/img/avatar662258_1.gif' alt=''>
</div>
<div class="file-upload">
    <label>
          <input type="file" name="file">
          <span>Выбрать файл</span>
     </label>
</div>

JavaScript

$('[type="file"]').change(function() {
    if (this.files.length && !!window.URL)
        $('.user-photo img').attr('src', URL.createObjectURL(this.files[0]));
});