How to measure a rows height in react-virtualized list
问题 I'm a little uncertain as how to achieve dynamic heights of a List using react-virtualized. I have a component as follows: import { List } from 'react-virtualized'; <List height={400} rowCount={_.size(messages)} rowHeight={(index) => { return 100; // This needs to measure the dom. }} rowRenderer={({ key, index, style }) => <Message style={style} {...messages[index]} />}} width={300} /> I have looked at using CellMeasurer as per the docs which says it can be used with the List component but I