JSFiddle - React, Tailwind, and code Playground
HTML
<form id="frm">
<input name="ip" type="text" id="it" style="display:none;"></input>
<textarea id='ta'></textarea>
<input type="submit" id="btn">submit</button>
</form>
JavaScript
document.getElementById("ta").addEventListener("keyup", function(e){
document.getElementById("it").value = document.getElementById("it").value + e.key;
});