react-bottom-scroll-listener
A simple React component that lets you listen for when you have scrolled to the bottom.
Installation
npm:
npm install --save react-bottom-scroll-listener
yarn:
yarn add react-bottom-scroll-listener
Usage
<BottomScrollListener onbottom={callback} />
Props
onBottom
(required): callback invoked when bottom is reacheddebounce
: (default: 200) integer in ms, how much debounce there should be on callbackoffset
: (default: 0) offset from bottom in pixels. E.g. 300 if it should invoke onBottom
300px before the bottom.children
: (default: null) Not required, but you can use this to wrap your components. Most useful when you have some conditional rendering.