still memoize TabItem
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user