Socket
Book a DemoInstallSign in
Socket

react-scroll-down

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-scroll-down

React scroll down to load data

latest
Source
npmnpm
Version
0.1.6
Version published
Maintainers
1
Created
Source

react-scroll-down

NPM Version Build Status Coverage Status

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

import ReactScrollDown from 'react-scroll-down'

CommonJS

const ReactScrollDown = require('react-scroll-down')

Usage

import ReactScrollDown from 'react-scroll-down'

function Example() {
  return (
    <ReactScrollDown
      elementDomId="layoutContentContainer"
      onBottomHeightChange={height => {
        // 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

LICENSE

MIT License

Keywords

react

FAQs

Package last updated on 06 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts