From 19558ea1a641109d18c8fd6f2847dad65a01f829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?= Date: Fri, 22 Nov 2024 09:40:30 +0100 Subject: [PATCH 1/2] fix: remove tab bar icon workaround --- packages/react-navigation/src/types.ts | 6 ------ packages/react-navigation/src/views/NativeBottomTabView.tsx | 6 +----- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/packages/react-navigation/src/types.ts b/packages/react-navigation/src/types.ts index 90ab4f36..e4c10708 100644 --- a/packages/react-navigation/src/types.ts +++ b/packages/react-navigation/src/types.ts @@ -67,12 +67,6 @@ export type NativeBottomTabNavigationOptions = { */ tabBarIcon?: (props: { focused: boolean }) => ImageSourcePropType | AppleIcon; - /** - * Whether the tab bar item is visible when this screen is active. - * Used for compatibility with JS Tabs. Prefer using `tabBarItemHidden` as this API may be removed in the future. - */ - tabBarButton?: () => null; - /** * Whether the tab bar item is visible. Defaults to true. */ diff --git a/packages/react-navigation/src/views/NativeBottomTabView.tsx b/packages/react-navigation/src/views/NativeBottomTabView.tsx index c1c3e739..14c28389 100644 --- a/packages/react-navigation/src/views/NativeBottomTabView.tsx +++ b/packages/react-navigation/src/views/NativeBottomTabView.tsx @@ -42,11 +42,7 @@ export default function NativeBottomTabView({ getBadge={({ route }) => descriptors[route.key]?.options.tabBarBadge} getHidden={({ route }) => { const options = descriptors[route.key]?.options; - - return ( - options?.tabBarItemHidden === true || - options?.tabBarButton?.() === null - ); + return options?.tabBarItemHidden === true; }} getIcon={({ route, focused }) => { const options = descriptors[route.key]?.options; From 38bfef2bd0458a60a152762ad9e03a8c09cfff9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Kwa=C5=9Bniewski?= Date: Fri, 22 Nov 2024 10:02:01 +0100 Subject: [PATCH 2/2] Create bright-pianos-invite.md --- .changeset/bright-pianos-invite.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/bright-pianos-invite.md diff --git a/.changeset/bright-pianos-invite.md b/.changeset/bright-pianos-invite.md new file mode 100644 index 00000000..2d55e41f --- /dev/null +++ b/.changeset/bright-pianos-invite.md @@ -0,0 +1,5 @@ +--- +"@bottom-tabs/react-navigation": patch +--- + +fix: remove `tabBarIcon` from experimental API