From 7c7565a2eff5df610b08f9a4a6d584827c320bc8 Mon Sep 17 00:00:00 2001 From: Aravind M Nair Date: Wed, 29 Jul 2026 19:14:48 +0530 Subject: [PATCH] Add ListItemComponent to VirtualizedList/FlatList/SectionList TS types ListItemComponent is a documented, public prop of VirtualizedList (and thus FlatList and SectionList) in the Flow source, but was missing from the hand-written TypeScript definitions, causing a type error when used. --- packages/virtualized-lists/Lists/VirtualizedList.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/virtualized-lists/Lists/VirtualizedList.d.ts b/packages/virtualized-lists/Lists/VirtualizedList.d.ts index 87ef2ba8e082..85c1c9f258fc 100644 --- a/packages/virtualized-lists/Lists/VirtualizedList.d.ts +++ b/packages/virtualized-lists/Lists/VirtualizedList.d.ts @@ -188,6 +188,14 @@ export interface VirtualizedListWithoutRenderItemProps< */ ListHeaderComponentStyle?: StyleProp | undefined; + /** + * Each data item is rendered using this element, as an alternative to `renderItem`. + * Can be a React Component Class or a render function. In addition to the data provided + * to `renderItem`, this receives `index` and `separators` metadata. + */ + ListItemComponent?: + React.ComponentType | React.ReactElement | null | undefined; + /** * The default accessor functions assume this is an Array<{key: string}> but you can override * getItem, getItemCount, and keyExtractor to handle any type of index-based data.