Skip to main content

ViewToken Object Type

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

Example

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

Keys and values

index

Unique numeric identifier assigned to the data element.

TypeOptionalnumberYes

isViewable

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

TypeOptionalbooleanNo

item

Item data

TypeOptionalanyNo

key

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

TypeOptionalstringNo

section

Item section data when used with SectionList.

TypeOptionalanyYes

Used by