JSFiddle - React, Tailwind, and code Playground
HTML
<div id="scroll">
<div id="content">
0<br/>
1<br/>
2<br/>
3<br/>
4<br/>
5<br/>
6<br/>
7<br/>
8<br/>
9<br/>
</div>
</div>
<div id="res">
</div>
CSS
#scroll { height : 100px;
overflow-y: scroll;}
JavaScript
$( function(){
$('#scroll').on('scroll', function(){
if ( $(this).scrollTop() == $(this)[0].scrollHeight-100 ) {
$("#content").clone().appendTo($('#scroll'));
}
})
})