react-easy-infinite-scroll

    0.1.1 • 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

    Install

    npm i react-easy-infinite-scroll

    DownloadsWeekly Downloads

    2

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    8.5 kB

    Total Files

    6

    Last publish

    Collaborators

    • avatar