Does react-aria-components collections support virtualization? #4393
-
As I understand react-stately collections is responsible for virtualization. And since react-aria-components' collections are build on react-stately I assume they handle virtualization of large lists too. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hey, so collections are not responsible for virtualization. They are just responsible for managing large sets of data and helping to navigate them. Rendering them is different. We don't have much in the way of documentation around our own virtualizer right now, but you could look at it to see what we do. Theoretically, you should be able to use other virtualizer libraries, though I'm not sure how much people have tried yet. We haven't tried it out with the new RAC collection implementation yet either, so please let us know if you run into any issues with it. |
Beta Was this translation helpful? Give feedback.
-
@snowystinger im also bumping into this virtualization issue when it comes to rendering a rich content list in the thousands the standard RAC combobox is noticeably slower. im trying to follow along with @devongovett's example here but it becomes a tangled mess of props when i try to enforce an anti corruption layer of sorts between the RAC implementation for a ComboBox that stops at the Popover and the custom listbox that starts at his ListBox implementation but RAC doesn't expose the combobox state prop so im back to square one. adding some virtualization implementation docs to complement the useTable and useListBox hooks in the next release would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
-
Virtualizer is now documented: https://react-spectrum.adobe.com/react-aria/Virtualizer.html |
Beta Was this translation helpful? Give feedback.
Hey, so collections are not responsible for virtualization. They are just responsible for managing large sets of data and helping to navigate them. Rendering them is different. We don't have much in the way of documentation around our own virtualizer right now, but you could look at it to see what we do. Theoretically, you should be able to use other virtualizer libraries, though I'm not sure how much people have tried yet.
We haven't tried it out with the new RAC collection implementation yet either, so please let us know if you run into any issues with it.