JSFiddle - React, Tailwind, and code Playground

HTML

<ul id="result">
</ul>
<input id="text" type="text"/>

JavaScript

var value = "";

$("#text").keypress(function(e) {
    value += String.fromCharCode(e.which);
    $("#result").html("value changed! now it's: " + value);
})