Skip to content

dvislov/react-infinite-scroll-es2015

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-infinite-scroll-es2015

Infinite scroll ES2015 component for React based on react-infinite-scroll

Usage

npm install react-infinite-scroll-es2015

import InfiniteScroll from 'react-infinite-scroll-es2015';

<InfiniteScroll
  pageStart="0"
  threshold="500"
  loadMore={function()}
  hasMore={true || false}
  loader={<Loading />}>
  … here is your content to scroll
</InfiniteScroll>

Options

  • pageStart : 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

About

Infinite scroll for React

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •