React Hook which tells you when you've scrolled to bottom
Uses IntersectionObserver so make sure you can support it.
npm install --save use-scroll-to-bottom
The hook returns a tuple of two things:
- A RefCallback which needs to go on the last element of your scrolling container.
- A boolean value which tells you whether bottom has been reached or not.
MIT © tudorgergely