react-easy-infinite-scroll

0.1.6 • Public • Published

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

Package Sidebar

Install

npm i react-easy-infinite-scroll

Weekly Downloads

0

Version

0.1.6

License

MIT

Unpacked Size

9.59 kB

Total Files

6

Last publish

Collaborators

  • parthpatel.8