Loading…
A short voice session: one question, one follow-up, then instant feedback — up to 5 minutes.
Virtualization renders only the rows near the viewport and reuses them while scrolling, which cuts DOM size and render time; trade-offs include variable row heights, in-page search and accessibility.
Rendering every row creates a huge DOM that is slow to render, lay out and update. A virtualizer such as TanStack Virtual or react-window calculates which rows fall inside the visible area plus a small overscan, renders only those, and uses spacer elements to keep the scroll height correct. This makes scrolling smooth regardless of list length. The trade-offs: rows of unknown height need measuring, the browser's Find in page cannot see rows that are not rendered, screen readers need correct row counts and indexes, and preserving scroll position across updates takes care.