New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-virtual-list

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-virtual-list

Super simple virtualized list React component

1.0.0
Source
npm
Version published
Weekly downloads
131
-14.38%
Maintainers
1
Weekly downloads
 
Created
Source

react-virtual-list

Super simple virtualized list React component

Check out the demo here

This React component allows you to display a large list of fixed-height items in your document, while only rendering the items visible in the viewport. This allows a large list to be rendered with much fewer DOM elements.

Installation

You can use NPM to install react-virtual-list:

$ npm install react-virtual-list --save

Usage

The ./dist/VirtualList.js module exports a single React component.

var VirtualList = require('./node_modules/react-virtual-list/dist/VirtualList.js');
JSX
<VirtualList items={this.props.items} renderItem={this.renderItem} itemHeight={this.props.itemHeight} />
Properties
  • items the full array of list items. Only the visible subset of these will be rendered.
  • renderItem a function to render a single item, passed as argument item
  • itemHeight the height in pixels of a single item. You must have a CSS rule that sets the height of each list item to this value.
Example Usage

Check out https://github.com/developerdizzle/react-virtual-list/blob/gh-pages/App.jsx for the example used in the demo.

Keywords

react

FAQs

Package last updated on 25 May 2015

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