Socket
Socket
Sign inDemoInstall

react-lazy-list

Package Overview
Dependencies
3
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-lazy-list

Lazy list react component for render very large Infinitely lists


Version published
Weekly downloads
5
increased by150%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

react-lazy-list

Build Status Coverage Status Dependencies Status

This is a simple and fast realization of lazy list as the react component that show entities only when user can see them. Thats why it can render very large lists and does not lose performance.

import React, { Component } from 'react'
import LazyList from 'react-lazy-list'

export default class App extends Component {
  render() {
    const onMoreHandle = () => void
    return (
      <LazyList elementHeight={ 300 } onMore={ this.onMoreHandle } >
        { entities.map(entity => (
          <Item key={ entity.id } entity={ entity } />
        )) }
        <Dummy />
      </LazyList>
    )
  }
}

props

children

Object required Entities collection to render.

elementHeight

Number required Pixels number of height of collection entity.

windowHeight

Number Custom container height in pixels, i.e. for server side rendering.

topScrollOffset

Number Offset from top of window to increase the threshold of the moment trip. Usable to make a scroll offset for header height.

bottomScrollOffset

Number Offset from top of window to decrease the threshold of the moment trip. Usable for increase value an scroll offset for header height.

onMore

Function Handler to call then list seek to end.

Keywords

FAQs

Last updated on 17 Feb 2017

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc