react-infinite-scroll-meteor

0.1.2 • Public • Published

react-infinite-scroll-meteor Build Status npm version

Installation

npm install react-infinite-scroll-meteor --save

Properties

container

The class name of the container for which the scroll event listener is to be given. Default: window

endPadding

The padding at which the loadMore method is to be called Default: 100

loadMore

Function that is called when scrolled after the endPadding is reached

Example

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

class ComponentWithInfiniteScroll extends React.Component {

  getMore() {
    // Call the Meteor subscription method
    // to load next set of data
  }

  render() {
    return(
      <Infinite
        container="container"
        endPadding={100}
        loadMore={this.getMore}
      >
        <div className="container">
          // some list of children
          </div>
      </Infinite>
      );
  }
}

export default ComponentWithInfiniteScroll;

License

MIT

Package Sidebar

Install

npm i react-infinite-scroll-meteor

Weekly Downloads

3

Version

0.1.2

License

MIT

Last publish

Collaborators

  • mohithg