rc-loadmore

0.1.2 • Public • Published

rc-loadmore

a loadmore component for react

demo

install

npm install rc-loadmore

Usage

<RcLoadMore
  threshold={200}
  cb={() => {
    console.log('trigger cb...')
  }}
>
  <div>
    {this.renderContent()}
  </div>
</RcLoadMore>

API

props type
threshold number 触发 cb() 时,滚动到页面底部的距离
timer number debounce 函数的 timer
disabled boolean 组件是否生效
hasMore boolean 是否有更多内容,控制底部显示
loadingContent React.Node hasMore === ture 时显示
noMoreContent React.Node hasMore === false 时显示
cb function 到底时触发的函数

Package Sidebar

Install

npm i rc-loadmore

Weekly Downloads

0

Version

0.1.2

License

MIT

Unpacked Size

297 kB

Total Files

6

Last publish

Collaborators

  • risker