[Architecture] Support virtualized collections
TimLariviere opened this issue · 0 comments
TimLariviere commented
2 ways to represent item collection controls such as ListView, CollectionView, CarouselView, etc.
// Virtualized list
ListView(items, fun item -> item.Id, fun item ->
TextCell(item.Text)
)
// Explicit list
ListView([
for item in items do
TextCell(item.Text)
.key(item.Id)
])
In v1, we're only supporting explicit lists but it has a lot of constraints.
Virtualization is hard to do and if you happen to have 1 million items in your list, it would completely kill the performance (view function + diffing).
So I think it would be better to create 2 kinds of lists ListView
+ VirtualizedListView
to support better virtualization.