react-infinite-scroll-pager
v1.0.0
Published
A infinite scroller pager component for React
Downloads
1
Readme
react-infinite-scroll-pager
A infinite scroller pager component for React
Install
npm install --save react-infinite-scroll-pager
Usage
import React, { Component } from 'react'
import MyComponent from 'react-infinite-scroll-pager'
class Example extends Component {
render() {
return (
<InfiniteScrollPager
page={page}
totalPage={5}
isLoading={isLoading}
loader={<div>loading...</div>}
noMoreTip={<div>No more articles</div>}
onPageChange={page => loadList(page)}
>
{list.map(item => (
<Item key={item.id} item={item} />
))}
</InfiniteScrollPager>
)
}
}
License
MIT © JasonHeylon