Loading...
Loading...
By continuing to use the platform, you accept the terms of the Privacy Policy and the use of cookies.
Virtualization is a technique in interface development where only visible part of large list or table is rendered in DOM, not entire data volume at once.
Invisible elements aren't created or are reused, and during scrolling — dynamically loaded and replaced. This approach significantly reduces browser load and makes interface more responsive.
Fewer elements in DOM — less browser load. This speeds up render and reduces lags during interaction.
Only visible part of data is rendered, which is especially critical when working with thousands of rows in list or table.
Scrolling and element interaction become much faster as DOM isn't overloaded with "extra" elements.
React doesn't have built-in virtualization, but it's easily implemented using libraries:
import { FixedSizeList as List } from 'react-window';
const Row = ({ index, style }) => (
<div style={style}>Element #{index}</div>
);
<List
height={400}
itemCount={10000}
itemSize={35}
width={300}
>
{Row}
</List>
Here DOM will have maximum 20–30 elements — despite having 10,000 data items.
| Before | After | |
|---|---|---|
| Load speed | Long list loading | Almost instant render |
| DOM size | DOM with thousands of elements | Only visible part in DOM |
| Scroll performance | Lags during scrolling | Smooth scrolling |
Summary:
Virtualization is key to performance when working with large volumes of UI data. It saves resources, speeds up interaction and makes interface responsive.