React scroll down to load data
npm install react-scroll-down[![NPM Version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]
[![Coverage Status][coverage-image]][coverage-url]
![][david-url]
![][dt-url]
![][license-url]
React scroll down to load data. Support ie9+
``bash`
yarn add react-scroll-down
`bash`
npm install --save react-scroll-down
`javascript
OR
`
> Tips: You can find the library on window.ReactScrollDown.
`javascript`
import ReactScrollDown from 'react-scroll-down'
`javascript`
const ReactScrollDown = require('react-scroll-down')
`javascript
import ReactScrollDown from 'react-scroll-down'
function Example() {
return (
onBottomHeightChange={height => {
// do something
}}
>
{/* List only children or Null /}
)
}
`
> Tips: The elementDomId must have a scrolling style.(case: overflow-y: scroll)
elementDomId: Type string, isRequired. scrolling element id
onBottomHeightChange`: Type (height: number|undefined) => void. scrolling listen event returns height from bottom after execution
[npm-url]: https://npmjs.org/package/react-scroll-down
[npm-image]: https://badge.fury.io/js/react-scroll-down.png
[david-url]: https://david-dm.org/sanshuiwang/react-scroll-down.png
[travis-image]: https://api.travis-ci.com/sanshuiwang/react-scroll-down.svg?branch=master
[travis-url]: https://travis-ci.com/sanshuiwang/react-scroll-down
[coverage-image]: https://coveralls.io/repos/github/sanshuiwang/react-scroll-down/badge.svg?branch=master
[coverage-url]: https://coveralls.io/github/sanshuiwang/react-scroll-down
[dt-url]: https://img.shields.io/npm/dt/react-scroll-down.svg
[license-url]: https://img.shields.io/npm/l/react-scroll-down.svg