Skip to content

docs: clarify FlatList extraData prop and PureComponent behavior (fixes #5216) - #5282

Open
supunyasanthaofficial wants to merge 1 commit into
react:mainfrom
supunyasanthaofficial:fix/flatlist-extradata-example
Open

supunyasanthaofficial wants to merge 1 commit into
react:mainfrom
supunyasanthaofficial:fix/flatlist-extradata-example

Conversation

@supunyasanthaofficial

Copy link
Copy Markdown
Contributor

Summary

Fixes #5216.

Clarifies how extraData works in the selectable FlatList example in docs/flatlist.md. The change is also applied to the versioned docs from 0.77 through 0.87.

Changes

  • Explained that extraData tells FlatList when it needs to account for changes in data outside its data prop.
  • Clarified that FlatList uses shallow prop comparison, so extraData is important when renderItem doesn't change its reference but depends on external state.
  • Removed the ambiguous use of "we" to follow the documentation style guide.

Test Plan

  • Ran npx eslint docs/flatlist.md with no errors.
  • Checked formatting across the versioned docs from 0.77 through 0.87.

@meta-cla meta-cla Bot added the CLA Signed label Oct 14, 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.

Example showing need for FlatList extraData prop is misleading

1 participant