WICG / virtual-scroller

Other
2k stars 83 forks source link

[traditional-virtualization] How would a front-end framework leverage that key reordering functionality? #195

Closed dead-claudia closed 4 years ago

dead-claudia commented 4 years ago

In this section, it notes you can reorder elements by key. This is obviously a common use case, and most modern frameworks with significant usage include that necessary key reconciliation algorithm internally (a good barometer for the need for its inclusion in the standard). However, it's unclear how this could be leveraged by them, and without fragment support, frameworks that support reordering fragments using keys (most modern frameworks, too, including React, Angular, and Vue) can't use this in the general case anyways.

fergald commented 4 years ago

Nobody is pursuing this traditional-virtualization approach. I have added a note to the README to make that clearer. In the approach described on the master branch, you just materialize your content in the DOM and wrap it in a <virtual-scroller> tag and you're done. If you want to reorder things, you just reorder them in the DOM.