node package manager
It’s your turn. Help us improve JavaScript. Take the 2017 JavaScript Ecosystem Survey »



React components for efficiently rendering large, scrollable lists

It is inefficient to create and manage a large list of DOM elements within a scrolling container if only a few of those elements are visible. The primary purpose of this library is to improve performance by only rendering the DOM nodes that a user is able to see based on their current scroll position.


This component renders a simple list of elements with a fixed height. It is similar to the react-infinite library's Infinite component but offers some additional functionality such as the ability to programmatically scroll to ensure that a specific row/item is visible within the container.

To use this component, simply provide it with a height, rowHeight and children like so:

  { => (
    <div key={}>

You may also specify an additional scrollToIndex property to ensure that a certain row/index is visible. This can be useful for auto-scrolling to a search result or for showing the most recently added list item.


The FlexTable component is based on Facebook's fixed-data-table but has a more efficient DOM structure that allows for easier, more flexible styleing. It uses VirtualScroll internally to ensure that only visible table rows are rendered.

Its interface is very similar to the Facebook component:

      (dataKey, rowData, columnData) => /* return computed value */
      (cellData, cellDataKey, rowData, rowIndex, columnData) => /* return custom-rendered cell */

FlexTable also provides an AutoSizingTable wrapper which will expand a given table to fill all of the available browser height below the table in the window.