JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text">
<br>
<span class="res"></span>

JavaScript

$(document).on('keyup', 'input', function(){
  var text = $(this).val();
        $('.res').text(text);
});