import React from 'react'; import { CellMeasurer, CellMeasurerCache, List } from 'react-virtualized'; // In this example, average cell height is assumed to be about 50px. // This value will be used for the initial `Grid` layout. // Width is not dynamic. const cache = new CellMeasurerCache({ defaultHeight: 50, fixedWidth: true }); function rowRenderer ({ index, isScrolling, key, parent, style }) { const source // This comes from your list data return ( {({ measure, registerChild }) => ( // 'style' attribute required to position cell (within parent List)
)}
); } function renderList (props) { return ( ); }