JSFiddle - React, Tailwind, and code Playground
HTML
<div style="height: 200px; width: 200px;overflow:auto">
<div style="height: 1000px">Scroll down</div>
<div id="waypoint">Waypoint</div>
</div>
JavaScript
var waypoint = new Waypoint({
element: document.getElementById('waypoint'),
handler: function(direction) {
console.log('waypoint')
},
offset: 'bottom-in-view'
})