These libraries solve the performance problem of rendering large lists in React applications. When a list contains thousands of items, rendering all DOM nodes at once causes slow load times and sluggish scrolling. These packages use "virtualization" or "windowing" techniques to only render the items currently visible in the viewport. react-virtualized and react-window are the most robust solutions, offering grid support and precise scroll handling. react-infinite focuses on infinite scroll patterns where items append as you scroll. react-list and react-tiny-virtual-list offer lighter weight alternatives but with fewer features and less active maintenance. Choosing the right one depends on whether you need complex layouts, variable item heights, or long-term support.
Rendering long lists in React can crash a browser if not handled correctly. All five packages — react-infinite, react-list, react-tiny-virtual-list, react-virtualized, and react-window — aim to solve this by rendering only visible items. However, they differ significantly in architecture, API design, and long-term viability. Let's break down how they handle common engineering challenges.
The fundamental difference lies in how they manage the DOM. Some use "windowing" (recycling nodes in a fixed container), while others use "infinite scroll" (appending nodes).
react-window uses a windowing approach. It keeps the container height fixed and moves the content inside using transforms.
// react-window: FixedSizeList
import { FixedSizeList } from 'react-window';
const Row = ({ index, style }) => (
<div style={style}>Row {index}</div>
);
const List = () => (
<FixedSizeList height={400} itemCount={1000} itemSize={35}>
{Row}
</FixedSizeList>
);
react-virtualized also uses windowing but with a heavier API structure.
// react-virtualized: List
import { List } from 'react-virtualized';
const Row = ({ index, key, style }) => (
<div key={key} style={style}>Row {index}</div>
);
const List = () => (
<List
height={400}
rowCount={1000}
rowHeight={35}
rowRenderer={Row}
width={300}
/>
);
react-infinite uses an infinite scroll approach, appending elements as you reach the bottom.
// react-infinite: Infinite
import Infinite from 'react-infinite';
const List = () => (
<Infinite
elementHeight={35}
containerHeight={400}
onInfiniteLoad={() => loadMoreItems()}
>
{items.map(item => <div key={item.id}>{item.name}</div>)}
</Infinite>
);
react-list uses a windowing approach optimized for simplicity.
// react-list: List
import List from 'react-list';
const Item = (key, index) => <div key={key}>Row {index}</div>;
const List = () => (
<List
itemRenderer={Item}
length={1000}
useStaticItemDimensions={true}
/>
);
react-tiny-virtual-list uses a simple windowing approach for fixed sizes.
// react-tiny-virtual-list: VirtualList
import VirtualList from 'react-tiny-virtual-list';
const List = () => (
<VirtualList
width={300}
height={400}
itemSize={35}
items={items}
renderItem={({ index, style }) => (
<div style={style}>Row {index}</div>
)}
/>
);
Support for items with different heights is a common requirement. This is where the older or simpler libraries often fall short.
react-window supports this via VariableSizeList. You must manually manage height caching.
// react-window: VariableSizeList
import { VariableSizeList } from 'react-window';
const List = () => (
<VariableSizeList
height={400}
itemCount={items.length}
itemSize={index => getHeightForItem(index)}
>
{Row}
</VariableSizeList>
);
react-virtualized supports this via CellMeasurer or dynamic row heights.
// react-virtualized: Dynamic Row Height
import { List, CellMeasurer, CellMeasurerCache } from 'react-virtualized';
const cache = new CellMeasurerCache({ fixedWidth: true });
const Row = ({ index, key, parent, style }) => (
<CellMeasurer cache={cache} index={index} key={key} parent={parent}>
{({ measure, content }) => (
<div style={style} onLoad={measure}>{content}</div>
)}
</CellMeasurer>
);
react-infinite does not support variable heights natively. You must approximate heights or use uniform containers.
// react-infinite: No native support
// Developers often wrap items in fixed-height containers
// to prevent layout shifts, limiting design flexibility.
react-list supports variable heights but requires specific configuration.
// react-list: Variable Dimensions
import List from 'react-list';
const List = () => (
<List
itemRenderer={Item}
length={1000}
useStaticItemDimensions={false}
/>
);
react-tiny-virtual-list does not support variable item heights. It requires a fixed itemSize prop.
// react-tiny-virtual-list: Fixed Size Only
// The API requires a single number for itemSize.
// Variable heights are not supported.
Loading more data as the user scrolls is distinct from virtualizing existing data. Some libraries blend these concerns.
react-window separates virtualization from data loading. You wrap it with an external loader or use react-window-infinite-loader.
// react-window: With Infinite Loader
import { FixedSizeList } from 'react-window';
import InfiniteLoader from 'react-window-infinite-loader';
const List = () => (
<InfiniteLoader
isItemLoaded={isItemLoaded}
loadMoreItems={loadMoreItems}
itemCount={items.length}
>
{({ onItemsRendered, ref }) => (
<FixedSizeList
itemCount={items.length}
itemSize={35}
onItemsRendered={onItemsRendered}
ref={ref}
>
{Row}
</FixedSizeList>
)}
</InfiniteLoader>
);
react-virtualized includes InfiniteLoader as a built-in component.
// react-virtualized: InfiniteLoader
import { InfiniteLoader, List } from 'react-virtualized';
const List = () => (
<InfiniteLoader
isRowLoaded={({ index }) => !!items[index]}
loadMoreRows={loadMoreItems}
rowCount={items.length}
>
{({ onRowsRendered, registerChild }) => (
<List
onRowsRendered={onRowsRendered}
ref={registerChild}
rowCount={items.length}
rowHeight={35}
rowRenderer={Row}
/>
)}
</InfiniteLoader>
);
react-infinite has infinite loading built into the core component.
// react-infinite: Built-in Loading
import Infinite from 'react-infinite';
const List = () => (
<Infinite
elementHeight={35}
containerHeight={400}
onInfiniteLoad={() => loadMoreItems()}
loadingSpinner={LoadingComponent}
>
{items.map(item => <div key={item.id}>{item.name}</div>)}
</Infinite>
);
react-list does not have built-in infinite loading. You must handle data fetching externally.
// react-list: External Loading
// Developers must manage state and append items to the
// list manually before passing them to the List component.
react-tiny-virtual-list does not have built-in infinite loading. External state management is required.
// react-tiny-virtual-list: External Loading
// Similar to react-list, you must manage the items array
// and pass the updated list to the VirtualList component.
Choosing a library is not just about features — it is about who will fix bugs next year.
react-window is actively maintained by Brian Vaughn at Vercel. It receives updates for React concurrency features and bug fixes. It is the safest bet for new projects.
react-virtualized is in maintenance mode. The author recommends react-window for new work. It will not receive new features, only critical fixes.
react-infinite has seen minimal activity in recent years. It is considered legacy software. Using it introduces risk for security patches or React compatibility.
react-list has not seen significant updates in years. It is stable but stagnant. Teams should plan to migrate away from it during major refactors.
react-tiny-virtual-list is also stagnant. While the code is simple and less likely to break, it lacks support for modern React patterns like hooks or concurrent rendering.
| Feature | react-window | react-virtualized | react-infinite | react-list | react-tiny-virtual-list |
|---|---|---|---|---|---|
| Architecture | Windowing | Windowing | Infinite Scroll | Windowing | Windowing |
| Variable Heights | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | ❌ No |
| Infinite Load | ⚠️ Add-on | ✅ Built-in | ✅ Built-in | ❌ External | ❌ External |
| Grid Support | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |
| Maintenance | 🟢 Active | 🟡 Maintenance | 🔴 Legacy | 🔴 Legacy | 🔴 Legacy |
react-window is the modern standard 🏆. It balances performance, bundle size, and API simplicity. Use this for almost all new development.
react-virtualized is the legacy enterprise choice 🏢. Stick with it only if you are already deeply invested in its ecosystem or need specific components like Collection.
react-infinite, react-list, and react-tiny-virtual-list are legacy tools 🕰️. They may work for small, static projects, but they lack the active support and feature depth required for complex modern applications. Migrating to react-window is the recommended path for long-term health.
Choose react-window for all new projects requiring list or grid virtualization, as it is the modern successor to react-virtualized with a smaller bundle size and simpler API. It is actively maintained and supports both fixed and variable item sizes efficiently. This is the standard choice for teams looking for stability, performance, and long-term compatibility with modern React versions.
Choose react-virtualized if you are maintaining an existing enterprise application that relies on its extensive feature set, including complex grids and collection views. It is a mature library but is now in maintenance mode, meaning new features are unlikely. For new projects, consider migrating to react-window unless you need specific legacy components like Collection that are not available elsewhere.
Choose react-list if you are working on an older codebase that already implements it and requires a simple, lightweight virtualization solution for uniform lists. It is not suitable for new development due to its age and lack of recent updates. Avoid this package if you need support for variable item heights or complex grid layouts, as it focuses on basic list rendering.
Choose react-tiny-virtual-list if you need a very small bundle size for a simple list with fixed item heights and cannot afford the dependencies of larger libraries. It is best for small-scale projects or embedded widgets where performance overhead must be minimal. Do not use this for complex applications requiring variable row heights, sticky headers, or active long-term support.
Choose react-infinite if you are maintaining a legacy application that already depends on it and specifically needs an infinite scroll pattern where items append to the DOM. It is not recommended for new projects because it lacks the performance optimizations of modern windowing libraries and has limited maintenance. Use this only if you need to load more data automatically as the user scrolls down without a fixed container height.
react-window is a component library that helps render large lists of data quickly and without the performance problems that often go along with rendering a lot of data. It's used in a lot of places, from React DevTools to the Replay browser.
If you like this project there are several ways to support it:
The following wonderful companies and individuals have sponsored react-window:
Begin by installing the library from NPM:
npm install react-window
TypeScript definitions are included within the published dist folder
Frequently asked questions can be found here.
Documentation for this project is available at react-window.vercel.app.
Renders data with many rows.
| Name | Description |
|---|---|
| rowComponent | React component responsible for rendering a row. This component will receive an ℹ️ Spread ℹ️ The prop types for this component are exported as |
| rowCount | Number of items to be rendered in the list. |
| rowHeight | Row height; the following formats are supported:
ℹ️ Percentage heights can't be resolved during server rendering unless a ⚠️ Dynamic row heights are not as efficient as predetermined sizes. It's recommended to provide your own height values if they can be determined ahead of time. |
| rowProps | Additional props to be passed to the row-rendering component. List will automatically re-render rows when values in this object change. ⚠️ This object must not contain |
| Name | Description |
|---|---|
| className | CSS class name. |
| style | Optional CSS properties. The list of rows will fill the height defined by this style. |
| children | Additional content to be rendered within the list (above rows). This property can be used to render things like overlays or tooltips. |
| defaultHeight | Default height of list (in pixels) for initial render, before its actual height has been measured. ℹ️ Lists can't be measured during server rendering, so this value determines how many rows are server rendered.
It's recommended to set this to the expected height of the list (or to specify a pixel height via the |
| defaultScrollOffset | Initial scroll offset (in pixels) of the list. This value is only applied once, when the list first mounts with at least one row. ℹ️ Server-rendered HTML can't be pre-scrolled, so server rendering always starts at the first row; the default scroll offset is applied once the list hydrates. ⚠️ If the list can't be scrolled that far when the offset is applied (e.g. it is hidden with |
| listRef | Ref used to interact with this component's imperative API. This API has imperative methods for scrolling and a getter for the outermost DOM element. ℹ️ The |
| onResize | Callback notified when the List's outermost HTMLElement resizes. This may be used to (re)scroll a row into view. |
| onRowsRendered | Callback notified when the range of visible rows changes. |
| overscanCount | How many additional rows to render outside of the visible area. This can reduce visual flickering near the edges of a list when scrolling. |
| rowKey | Lists use the row index as a ℹ️ Custom keys can ensure better UX for sortable or filterable lists, particularly if your row components are stateful. Refer to the React documentation for more info. ⚠️ This prop cannot be auto-memoized because it is called during render.
It is important to always |
| scrollElement | Element that scrolls the list, for lists that scroll along with other content (e.g. the page):
The list renders at its full height and only renders the rows visible within the scroll element's viewport. Its position within the scroll element is measured whenever it renders, scrolls, or resizes, and whenever content before it is resized, inserted, or removed (e.g. an image loading above the list).
ℹ️ While the scroll element is ⚠️ The list itself doesn't scroll, so its |
| tagName | Can be used to override the root HTML element rendered by the List component. The default value is "div", meaning that List renders an HTMLDivElement as its root. ⚠️ In most use cases the default ARIA roles are sufficient and this prop is not needed. |
Renders data with many rows and columns.
ℹ️ Unlike List rows, Grid cell sizes must be known ahead of time.
Either static sizes or something that can be derived (from the data in CellProps) without rendering.
| Name | Description |
|---|---|
| cellComponent | React component responsible for rendering a cell. This component will receive ℹ️ The prop types for this component are exported as |
| cellProps | Additional props to be passed to the cell-rendering component. Grid will automatically re-render cells when values in this object change. ⚠️ This object must not contain |
| columnCount | Number of columns to be rendered in the grid. |
| columnWidth | Column width; the following formats are supported:
ℹ️ Percentage widths can't be resolved during server rendering unless a |
| rowCount | Number of rows to be rendered in the grid. |
| rowHeight | Row height; the following formats are supported:
ℹ️ Percentage heights can't be resolved during server rendering unless a |
| Name | Description |
|---|---|
| className | CSS class name. |
| dir | Indicates the directionality of grid cells. ℹ️ The directionality of an ancestor element can't be detected during server rendering; specify this prop explicitly for server-rendered right-to-left grids. ℹ️ See HTML |
| style | Optional CSS properties. The grid of cells will fill the height and width defined by this style. |
| children | Additional content to be rendered within the grid (above cells). This property can be used to render things like overlays or tooltips. |
| columnKey | Grids use the column index as a ℹ️ Custom keys can ensure better UX for sortable or filterable grids, particularly if your cell components are stateful. Refer to the React documentation for more info. ⚠️ This prop cannot be auto-memoized because it is called during render.
It is important to always |
| defaultHeight | Default height of grid (in pixels) for initial render, before its actual height has been measured. ℹ️ Grids can't be measured during server rendering, so this value determines how many rows are server rendered.
It's recommended to set this to the expected height of the grid (or to specify a pixel height via the |
| defaultScrollLeft | Initial horizontal scroll offset (in pixels) of the grid. This value is only applied once, when the grid first mounts with at least one column. ℹ️ Server-rendered HTML can't be pre-scrolled, so server rendering always starts at the first column; the default scroll offset is applied once the grid hydrates. ⚠️ If the grid can't be scrolled that far when the offset is applied (e.g. it is hidden with |
| defaultScrollTop | Initial vertical scroll offset (in pixels) of the grid. This value is only applied once, when the grid first mounts with at least one row. ℹ️ Server-rendered HTML can't be pre-scrolled, so server rendering always starts at the first row; the default scroll offset is applied once the grid hydrates. ⚠️ If the grid can't be scrolled that far when the offset is applied (e.g. it is hidden with |
| defaultWidth | Default width of grid (in pixels) for initial render, before its actual width has been measured. ℹ️ Grids can't be measured during server rendering, so this value determines how many columns are server rendered.
It's recommended to set this to the expected width of the grid (or to specify a pixel width via the |
| gridRef | Imperative Grid API. ℹ️ The |
| onCellsRendered | Callback notified when the range of rendered cells changes. |
| onResize | Callback notified when the Grid's outermost HTMLElement resizes. This may be used to (re)scroll a cell into view. |
| overscanCount | How many additional rows/columns to render outside of the visible area. This can reduce visual flickering near the edges of a grid when scrolling. |
| rowKey | Grids use the row index as a ℹ️ Custom keys can ensure better UX for sortable or filterable grids, particularly if your cell components are stateful. Refer to the React documentation for more info. ⚠️ This prop cannot be auto-memoized because it is called during render.
It is important to always |
| scrollElement | Element that scrolls the grid, for grids that scroll along with other content (e.g. the page):
The grid renders at its full height and only renders the rows (and columns) visible within the scroll element's viewport. Its position within the scroll element is measured whenever it renders, scrolls, or resizes, and whenever content before it is resized, inserted, or removed (e.g. an image loading above the grid).
ℹ️ While the scroll element is ⚠️ The grid's |
| tagName | Can be used to override the root HTML element rendered by the Grid component. The default value is "div", meaning that Grid renders an HTMLDivElement as its root. ⚠️ In most use cases the default ARIA roles are sufficient and this prop is not needed. |