React · Senior · Question 22 of 75

You need to render a list of 100,000 items. What should you do?

Explanation

The bottleneck is the number of DOM nodes. Virtualization (TanStack Virtual, react-window) renders a window of visible rows and swaps them while scrolling. memo doesn't reduce the DOM, and timer batches only stretch out the same work. Also consider pagination or server-side filtering.

Further reading

Problem with a question

React · Senior · question 22

Test yourself

Take the React · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz