ViewToken Object Type
ViewToken object is returned as one of properties in the onViewableItemsChanged callback, for example in FlatList component. It is exported by ViewabilityHelper.js.
Exampleβ
{
item: {key: "key-12"},
key: "key-12",
index: 11,
isViewable: true
}
Keys and valuesβ
indexβ
Unique numeric identifier assigned to the data element.
| Type | Optional |
|---|---|
| number | Yes |
isViewableβ
Specifies if at least some part of list element is visible in the viewport.
| Type | Optional |
|---|---|
| boolean | No |
itemβ
Item data
| Type | Optional |
|---|---|
| any | No |
keyβ
Key identifier assigned of the data element extracted to the top level.
| Type | Optional |
|---|---|
| string | No |
sectionβ
Item section data when used with SectionList.
| Type | Optional |
|---|---|
| any | Yes |
Used byβ
Is this page useful?