search

Home  >  Q&A  >  body text

javascript - Could you please tell me whether the lazy rendering of FlatList in React-Native is based on the item or the smallest component?

FlatList renders child elements lazily and only starts rendering when they are about to appear on the screen.
So is it rendered in units of items or in units of smallest components?
Suppose a list has 3 items, one Item occupies 3 screens, and each item contains 10 components
The first 3 items of the first item are on the first screen, then only the first rendering is done Should the first 3 (or 4, 5) components still render the first item?

滿天的星座滿天的星座2764 days ago780

reply all(1)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-31 10:39:53

    All of them. FlatList only knows that item is not on the screen, it is not worth the components inside item.

    reply
    0
  • Cancelreply