Skip to content

chentsulin/react-scrolla

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

react-scrolla

NPM version Build Status Test coverage Dependency Status

React Infinite Scroll Component

Install

$ npm install react-scrolla

Usage

var ReactScrolla = require('react-scrolla');

<ReactScrolla
  percentage={85}
  onPercentage={this.handleScrollToPercentage}
>
  {items}
</ReactScrolla>
//=>

API

props

percentage

Type: number Default: 90

Which percentage when scroll over will trigger onPercentage.

onPercentage

Type: function

How to fetch more items.

isLoading

Type: boolean Default: false

onPercentage will not be triggered when isLoading is true.

License

MIT © C.T. Lin