Skip to content

Document ListItemComponent prop on the FlatList page - #5198

Merged
Abbondanzo merged 4 commits into
react:mainfrom
aravi365:docs-flatlist-listitemcomponent
Sep 22, 2026
Merged

Abbondanzo merged 4 commits into
react:mainfrom
aravi365:docs-flatlist-listitemcomponent

Conversation

@aravi365

Copy link
Copy Markdown
Contributor

The FlatList page documents every inherited List*Component prop (ListEmptyComponent, ListFooterComponent, ListHeaderComponent, ItemSeparatorComponent) except ListItemComponent, so it looks like the prop does not exist on FlatList.

It does. FlatList._renderer renders <ListItemComponent {...props} /> and falls back to renderItem only when it is not set, so it also takes precedence when both are passed:

https://github.com/react/react-native/blob/main/packages/react-native/Libraries/Lists/FlatList.js#L624

It is already documented on the VirtualizedList page. This adds the same entry to FlatList, in alphabetical position next to the other List*Component props, and notes the precedence behaviour.

Type is listed as component, element to match the prop's type and the neighbouring entries on the same page.

FlatList supports ListItemComponent (it takes precedence over renderItem),
and it is documented on the VirtualizedList page, but the FlatList page
lists every other inherited List*Component prop except this one.
@meta-cla meta-cla Bot added the CLA Signed label Jul 31, 2026
@aravi365

Copy link
Copy Markdown
Contributor Author

@Simek would you mind taking a look at this one when you get a chance? It's a small addition to the FlatList page for ListItemComponent, which is documented on VirtualizedList but missing here. Happy to change anything.

@Abbondanzo
Abbondanzo merged commit cfc277f into react:main Sep 22, 2026
8 checks passed
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.

2 participants