1.0.2 • Published 6 years ago

n-react-infinite-scroll v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

React Infinite Scroll

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

Props

PropTypeDefaultDescription
handlerasync (event) => anyCalled when scrollbar is beyond the threshold, will not load the same direction until it has a resolved. Should return a true or false value ?
useWindowboolfalseUse window or parent elements scroll bar
thresholdnumber100Distance before triggering handler
directionsArray<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)