JSFiddle - React, Tailwind, and code Playground
by Anirban Nath
HTML
<textarea id='mta'></textarea>
JavaScript
$(function() {
$('#mta').keyup(function(e) {
while ($(this).outerHeight() < this.scrollHeight + parseFloat($(this).css("borderTopWidth")) + parseFloat($(this).css("borderBottomWidth"))) {
$(this).height($(this).height() + 1);
};
});
});