@vanyamate/react-infinity-virtual
v0.1.3
Published
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Maintainers
Readme
React Infinity Virtual Scroll
Install
npm i @vanyamate/react-infinity-virtualUsage 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 --optionalshowAmount- number of elements that will be rendereddistanceToNext- when there is less than this distance left, new elements will begin to be renderedonScrollHandler- callback when scrollingonShowIndexChange- callback after changing rendered elementscontentClassName- classname for inner div- and any default
divprops
