react-scroll-down
React scroll down to load data. Support ie9+
Install
yarn
yarn add react-scroll-down
npm
npm install --save react-scroll-down
UMD
<script src="https://unpkg.com/react-scroll-down@0.1.4/dist/index.umd.js"></script> OR <script src="https://unpkg.com/react-scroll-down@0.1.4/dist/index.umd.min.js"></script>
Tips: You can find the library on window.ReactScrollDown.
Import
ES2015
CommonJS
const ReactScrollDown =
Usage
{ return <ReactScrollDown elementDomId="layoutContentContainer" onBottomHeightChange= { // do something } > /** List only children or Null */ </ReactScrollDown> }
Tips: The elementDomId must have a scrolling style.(case: overflow-y: scroll)
Params
elementDomId
: Type string, isRequired. scrolling element id
onBottomHeightChange
: Type (height: number|undefined) => void. scrolling listen event returns height from bottom after execution