Created 6 years ago
Last updated: 2 months ago

React Bottom Scroll Listener

Loading...
usefulness
users
fun factor

A pretty simple small library that I wrote to solve a problem I had. I wanted to load more data when the user scrolled to the bottom of the page. I couldn't find a library that did this so I created one.

The math is pretty simple, so the library isn't more than 100 lines of code, it's mostly just hooking it up to scroll elements, and doing some math with some specific rounding to normalize browser behaviour.

It works both on the window and on any other scrollable element (using refs).

Window: window scroll gif

Container: container scroll gif

Github Source