JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
</div>
<input type="button" class="add" value="add!"/>
CSS
.container{
width:200px;
max-height:200px;
border:1px solid red;
overflow-y:scroll;
}
JavaScript
var i=0;
$(".add").click(function(){
i++;
var s ="<p>added value "+i+" ! </p>";
$(".container").append(s);
});