Skip to content

It's easy to import and use the component for infinite data scroll.

License

Notifications You must be signed in to change notification settings

ParthPatel-DA/react-easy-infinite-scroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-easy-infinite-scroll
npm npm License: MIT

All Contributors

A component to make all your infinite scrolling!

Install

  npm install --save react-easy-infinite-scroll

  or

  yarn add react-easy-infinite-scroll

  // in code ES6
  import ReactEasyInfiniteScroll from 'react-easy-infinite-scroll';

  // or commonjs
  var ReactEasyInfiniteScroll = require('react-easy-infinite-scroll');

Using

// payload: { skip: 0 }
const getData = (payload) => {
  // api call
};

<ReactEasyInfiniteScroll
  listLength={data.list.length}
  totalRecords={data.totalRecords}
  apiCallBack={getData}
/>;

props

name type description
listLength number pass length of current data list.
totalRecords number pass total records to show
apiCallBack function api call back function, you will get skip value as object
loader (optinal) node you can change the loader by this property, by default we have set the loader
loaderColor (optinal) string default loader color can be change by this property

Contributors ✨


Parth Patel

LICENSE

MIT

About

It's easy to import and use the component for infinite data scroll.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published