Building a virtualized list from scratch
React is pretty fast in general, but it can have trouble when repeatedly rendering thousands of elements. This is true even if only a few of the elements are visible at once! UI “virtualization” is a technique for emulating a list with many elements while only rendering as few as possible to make the screen look correct.
Of course, there are plenty of virtualization libraries already available. The most popular is react-virtualized
, which implements just about any layout you could think of and has a ton of customization available. Sometimes you only need…