JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="s">
<p id="tx"></p>
JavaScript
const x = document.getElementById("s");
x.onchange = function(){
newText = this.value;
document.getElementById("tx").innerHTML=newText;
};