react-loadmore-component
v0.5.0
Published
react loadmore component
Downloads
20
Readme
react-loadmore-component
A loadmore component for react.
Usage
$ npm install react-loadmore-component --save
import LoadMore from 'react-loadmore-component';
<LoadMore
loading={loading}
completed={completed}
onLoadMore={this.handleLoadMore}
>
<WrappedComponent />
</LoadMore>
Props
| Property | Description | Type | Default
|:----------------------------|:----------------------------------|:-------------------------|:------
| loading | required, display loading component |bool |false
| completed | required, display completed component and uninstall the listener |bool|false
| onLoadMore | required, callback function |() => {}| -
| distance | distance from the bottom of the page to trigger the callback function | number | 100
| style | loadmore container style | Object | -
| indicator | indicator config, custom loading and end display, { loading: ReactNode, completed: ReactNode }
, if ReactNode is null
, display default | Object | -