React Scroll Load Component
A dummy React component to implement continuous load on scroll for modern browser.
Usage
var ScrollLoad = require('react-component-scrollload');
}> {items}
npm install react-component-scroll --save
Prop types
propTypes: hasMore: ReactPropTypesboolisRequired // if there is more to load loadMore: ReactPropTypesfuncisRequired // callback to load more isLoading: ReactPropTypesboolisRequired // indicate if a loading is ongoing useDocument: ReactPropTypesbool // if true, the scrolling is calculated based on the document and not the element, default false threshold: ReactPropTypesnumber // pixel threshold, default 1000 loader: ReactPropTypescomponent // displayed loader component, default React.DOM.div(null, 'Loading...') // disable pointer to improve scrolling perf disablePointer: ReactPropTypesnumber // ms delay until disablePointerClass class is removed after last scroll event, default 0 (feature disabled) disablePointerClass: ReactPropTypesstring // default class added to child wrapper div, default 'disable-pointer'
Scroll performance
A dummy way to improve scrolling performance.
Add to your css a disable-pointer
definition, default name defined by disablePointerClass
.
Add disablePointer
prop with a delay in milliseconds.
...
Licence
MIT