From 250e06c96e150b4eaa4e1c08f28f93308fc9ad11 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Mon, 26 Jan 2026 14:05:29 +0200 Subject: [PATCH] memoize FlatList_INTERNAL --- src/view/com/util/Views.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/view/com/util/Views.tsx b/src/view/com/util/Views.tsx index 38c3f20904..cd3ecf533d 100644 --- a/src/view/com/util/Views.tsx +++ b/src/view/com/util/Views.tsx @@ -1,6 +1,5 @@ -import {forwardRef} from 'react' -import {type FlatListComponent} from 'react-native' -import {View, type ViewProps} from 'react-native' +import {forwardRef, memo} from 'react' +import {type FlatListComponent, View, type ViewProps} from 'react-native' import Animated from 'react-native-reanimated' import {type FlatListPropsWithLayout} from 'react-native-reanimated' @@ -10,7 +9,7 @@ import {type FlatListPropsWithLayout} from 'react-native-reanimated' * Avoid using `FlatList_INTERNAL` and use `List` where possible. * The types are a bit wrong on `FlatList_INTERNAL` */ -export const FlatList_INTERNAL = Animated.FlatList +export const FlatList_INTERNAL = memo(Animated.FlatList) export type FlatList_INTERNAL = Omit< FlatListComponent>, 'CellRendererComponent'