mirror of
https://github.com/status-im/react-native.git
synced 2025-02-08 23:53:27 +00:00
Summary:`WindowedListView` is designed for memory efficient scrolling of huge/infinite lists of variable height rows. It works by measuring row heights with `onLayout` and caching the results, then unmounting rows that scroll offscreen, replacing them with an equivalent offset in the spacer view. Care is taken to render a constant number of rows, and to only render one new row per tick to improve framerate and app responsiveness. WLV is also compatible with <Incremental> used within the rows themselves. `WindowedListView` is not a drop-in replacement for `ListView` - it doesn't support many of the features of `ListView`, such as section headers, only accepts a simple array of data instead of a datasource, and doesn't support horizontal scrolling. This may change in the future. This is still experimental - we haven't deployed this for any production apps yet. Differential Revision: D2791402 fb-gh-sync-id: 5f104e0903f6ba586d2d651bdf82863a231279d8 fbshipit-source-id: 5f104e0903f6ba586d2d651bdf82863a231279d8