<div id="react-root">
</div>
html {
background-color: gray;
}
.container {
background-color: white;
width: 600px;
margin: 20px auto;
}
const renderCounts = new Array(10000).fill(0);
function rowRenderer ({ index, isScrolling, key, style }) {
renderCounts[index]++;
return (
<div key={key} style={style}>
Item {index} (rendered {renderCounts[index]} times)
</div>
);
};
ReactDOM.render(
<div className="container">
<ReactVirtualized.List
width={600}
height={600}
rowCount={10000}
rowHeight={20}
rowRenderer={rowRenderer}
/>
</div>,
document.getElementById('react-root')
);
console.dir(ReactVirtualized);
View Compiled
This Pen doesn't use any external CSS resources.