ViewToken 对象

React 实战教程 深入学习一线大厂必备前端技能,VIP 教程限时免费领取。 立即查看 >

ViewToken object is returned as one of properties in the onViewableItemsChanged callback, for example in FlatList component. It is exported by ViewabilityHelper.js.

示例#

{
item: { key: "key-12" },
key: "key-12",
index: 11,
isViewable: true
}

属性与值#

index#

Unique numeric identifier assigned to the data element.

TypeOptional
numberYes

isViewable#

Specifies if at least some part of list element is visible in the viewport.

TypeOptional
booleanNo

item#

Item data

TypeOptional
anyNo

key#

Key identifier assigned of the data element extracted to the top level.

TypeOptional
stringNo

section#

Item section data when used with SectionList.

TypeOptional
anyYes

被下列组件引用#


本文档贡献者:sunnylqm(100.00%)#