react-loadmore-component

0.5.0 • Public • Published

react-loadmore-component

A loadmore component for react.

NPM downloads

Demo GIF

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 -

Thanks.

Readme

Keywords

Package Sidebar

Install

npm i react-loadmore-component

Weekly Downloads

1

Version

0.5.0

License

MIT

Unpacked Size

937 kB

Total Files

21

Last publish

Collaborators

  • morishara