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 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;