Skip to main content
Version: Next

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โ€‹

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

Keys and valuesโ€‹

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 to the data element extracted to the top level.

TypeOptional
stringNo

sectionโ€‹

Item section data when used with SectionList.

TypeOptional
anyYes

Used byโ€‹