n-react-infinite-scroll

1.0.2 • Public • Published

React Infinite Scroll

Up and down infinite scroll (todo: add left and right) npm i n-react-infinite-scroll

Props

Prop Type Default Description
handler async (event) => any Called when scrollbar is beyond the threshold, will not load the same direction until it has a resolved. Should return a true or false value ?
useWindow bool false Use window or parent elements scroll bar
threshold number 100 Distance before triggering handler
directions Array<string> ["down"] Directions that will load, currently up and/or down

Handler

Handler should return a value to indicate success of loading, indicating to reserve scroll height (direction: up)

Package Sidebar

Install

npm i n-react-infinite-scroll

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

83.9 kB

Total Files

6

Last publish

Collaborators

  • natty