Prompt
The math behind getItemLayout and virtualization, for fixed-height rows:
makeItemLayout(rowHeight)→ returns(data, index) => ({ length, offset, index })visibleRange(scrollY, viewportHeight, rowHeight, itemCount)→{ first, last }— the inclusive indexes of rows intersecting the viewport, clamped to[0, itemCount - 1]
Hints
Solution
Your Code
15 min