JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" />

JavaScript

$("input").keyup(function(e){
    $(this).val(e.which);
})