Skip to content

docs: clarify when index property in ViewToken can be null - #5272

Open
supunyasanthaofficial wants to merge 1 commit into
react:mainfrom
supunyasanthaofficial:fix/clarify-viewtoken-index-optional
Open

supunyasanthaofficial wants to merge 1 commit into
react:mainfrom
supunyasanthaofficial:fix/clarify-viewtoken-index-optional

Conversation

@supunyasanthaofficial

Copy link
Copy Markdown
Contributor

Fixes #3637

Summary

Updates the ViewToken documentation to explain why the index property is optional.

The index can be null when the viewable element is not a regular item from the data array. For example, this can happen when a section header or footer becomes viewable in a SectionList.

The same update has also been backported to the versioned docs for 0.77 through 0.87.

Test Plan

  • Ran Prettier on the modified files.
  • Verified ESLint passes:
    npx eslint docs/viewtoken.md website/versioned_docs/*/viewtoken.md
  • Verified the Docusaurus build succeeds:
    yarn --cwd website docusaurus build

@meta-cla meta-cla Bot added the CLA Signed label Oct 7, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ambiguity on why the index property in ViewToken is marked optional

1 participant