JSFiddle - React, Tailwind, and code Playground
HTML
<p>Event Data:
<textarea id="data" style="height:auto" rows = "20" cols="30">Sed non </textarea>
</p>
JavaScript
$("#data").change(function(){
alert($(this).val());
if($(this).text().length >40){
alert("text length out of bound");
}
});