@vanyamate/react-infinity-virtual
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

React Infinity Virtual Scroll

Install

npm i @vanyamate/react-infinity-virtual

Usage example

<BottomInfinityScroll
    showAmount={ 20 }
    distanceToNext={ 100 }
>
    {
        messages.map((message) => (
            <PrivateMessage
                key={ message.id }
                message={ message }
            />
        ))
    }
</BottomInfinityScroll>

Props

showAmount          --optional --default: 40
distanceToNext      --optional --default: 500
onScrollHandler     --optional
onShowIndexChange   --optional   
contentClassName    --optional
  • showAmount - number of elements that will be rendered
  • distanceToNext - when there is less than this distance left, new elements will begin to be rendered
  • onScrollHandler - callback when scrolling
  • onShowIndexChange - callback after changing rendered elements
  • contentClassName - classname for inner div
  • and any default div props

Package Sidebar

Install

npm i @vanyamate/react-infinity-virtual

Weekly Downloads

0

Version

0.1.3

License

ISC

Unpacked Size

16.4 kB

Total Files

11

Last publish

Collaborators

  • vanyamate