diff --git a/Libraries/Lists/VirtualizedListContext.js b/Libraries/Lists/VirtualizedListContext.js index dec07c75f31..d51a79244a0 100644 --- a/Libraries/Lists/VirtualizedListContext.js +++ b/Libraries/Lists/VirtualizedListContext.js @@ -142,10 +142,14 @@ export function VirtualizedListCellContextProvider({ cellKey: string, children: React.Node, }): React.Node { - const context = useContext(VirtualizedListContext); + // Avoid setting a newly created context object if the values are identical. + const currContext = useContext(VirtualizedListContext); + const context = useMemo( + () => (currContext == null ? null : {...currContext, cellKey}), + [currContext, cellKey], + ); return ( - + {children} );