React Virtualized - Screen going blank after scrolling a long list of itsm

Viewed 1879
1 Answers

As I inspected in this use case we shouldn't remount the root div for the rowRenderer : <div key={key} style={style}> on scrolling as used on the docs, so this should fix the performance problem :

function rowRenderer({ key, index, isScrolling, style }) {
  const content = isScrolling ? (
    <div>Scrolling...</div>
  ) : (
    <ListItem idx={index} item={airports[index]} />
  );
  return (
    <div key={key} style={style}>
      {content}
    </div>
  );
}
Related