bvaughn / react-window

React components for efficiently rendering large lists and tabular data
https://react-window.now.sh/
MIT License
15.72k stars 782 forks source link

shouldComponentUpdate not getting called in row component #664

Closed khuong-tran closed 3 weeks ago

khuong-tran commented 2 years ago

I'm using latest version of react-window with MUI and NextJS. Here is how the row is rendered

{({ index, style }) => (
          <Box key={index} sx={style}>
            <MenuItem2 {...countries[index]} />
          </Box>
        )}

MenuItem2 is a class component and in there i put some log in shouldComponentUpdate function but it never get called. Any help is much appreciated.