Skip to content

mohithg/react-infinite-scroll-meteor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

React Infinite scroll component to use with Meteor backend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published