1.0.0 • Published 5 years ago

react-infinity-scroll-list v1.0.0

Weekly downloads
5
License
ISC
Repository
github
Last release
5 years ago

React Infinity Scroll List

A versatile optimised infinite scroll React component.

Installation

npm i react-infinity-scroll-list --save

Examples

import React from 'react';
import InfiniteScroll from 'infinite-scroll-component';

function App() {
  return (
    <div>
        <InfiniteScroll data={data} drawElement={renderChild} size={20}></InfiniteScroll>
    </div>
  );
}

// List Item
function renderChild(item,key){
  return(<div key={key} className="child-comp">{item.title}</div>);
}

Props

Size is optional default value is 10.