still memoize TabItem

This commit is contained in:
Samuel Newman
2024-11-12 19:54:34 +00:00
parent 4f52841d44
commit bd9a941ced
+3 -2
View File
@@ -359,7 +359,7 @@ interface TabItemProps
onLongPress?: (event: GestureResponderEvent) => void onLongPress?: (event: GestureResponderEvent) => void
} }
function TabItem({ let TabItem = ({
testID, testID,
renderIcon, renderIcon,
notificationCount, notificationCount,
@@ -368,7 +368,7 @@ function TabItem({
accessible, accessible,
accessibilityHint, accessibilityHint,
accessibilityLabel, accessibilityLabel,
}: TabItemProps) { }: TabItemProps): React.ReactNode => {
return ( return (
<PressableScale <PressableScale
testID={testID} testID={testID}
@@ -388,3 +388,4 @@ function TabItem({
</PressableScale> </PressableScale>
) )
} }
TabItem = React.memo(TabItem)