React infinite scroll component as ES2015 module
npm install react-infinite-scroll-es2015npm install react-infinite-scroll-es2015``
import InfiniteScroll from 'react-infinite-scroll-es2015';
threshold="500"
loadMore={function()}
hasMore={true || false}
loader={
… here is your content to scroll
`pageStartOptions
* : The page number corresponding to the initial items, defaults to 0 which means that for the first loading, loadMore will be called with 1
* loadMore() : This function is called when the user scrolls down and we need to load stuff
* hasMore : Boolean stating if we should keep listening to scroll event and trying to load more stuff
* loader : Loader element to be displayed while loading stuff
* threshold` : The distance between the bottom of the page and the bottom of the window's viewport that triggers the loading of new stuff - Defaults to 250