JSFiddle - React, Tailwind, and code Playground

HTML

<div></div>

CSS

div{ height: 1000px}

JavaScript

function loadMore()
{
   console.log("More loaded");
    $("body").append("<div>");
   $(window).bind('scroll', bindScroll);
 }

 function bindScroll(){
   if($(window).scrollTop() + $(window).height() > $(document).height() - 100) {
       $(window).unbind('scroll');
       loadMore();
   }
}
 
$(window).scroll(bindScroll);