JSFiddle - React, Tailwind, and code Playground
HTML
<textarea ></textarea>
CSS
textarea {
resize: none;
overflow: hidden;
min-height: 20px;
}
JavaScript
$('textarea').keyup(function(){
$(this)[0].style.height = ($(this)[0].scrollHeight)+"px";
});