JSFiddle - React, Tailwind, and code Playground

by Yuriy Petrichenko

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;
};