const parentRef = React.useRef() // The virtualizer const rowVirtualizer = useVirtualizer({ count: items.length, getScrollElement: () => parentRef.current, estimateSize: () => 40, }) const rows = new Array(10000) .fill(true) .map(() => 25 + Math.round(Math.random() * 100)) [.....] return(