Search code examples
react-virtualizedreact-window

How can I render two list with dynamic height items using DOM recycling libraries such as 'react-window' or 'react-vizualaized'


I have a custom infinite scroll list of Unsplash images, each item has a dynamic height. I want to use two lists under one outerElementType to keep the shuffled layout, how can I achieve it using react-window or react-vizualaized libraries. I attached an example of what I want. I can't use VariableSizedGrid as it makes cells equal. Thanks!

enter image description here


Solution

  • I did not know, this layout is called Masonry layout which is supported by 'react-visualized' example