An open API service indexing awesome lists of open source software.

https://github.com/riskers/rc-loadmore

react loadmore component
https://github.com/riskers/rc-loadmore

component loadmore react

Last synced: 7 months ago
JSON representation

react loadmore component

Awesome Lists containing this project

README

          

# rc-loadmore

a loadmore component for react

[demo](https://stackblitz.com/edit/rc-loadmore)

## install

```
npm install rc-loadmore
```

## Usage

```
{
console.log('trigger cb...')
}}
>


{this.renderContent()}

```

## 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 | 到底时触发的函数 |