Skip to content

Commit 19558ea

Browse files
committed
fix: remove tab bar icon workaround
1 parent f128b02 commit 19558ea

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

packages/react-navigation/src/types.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,6 @@ export type NativeBottomTabNavigationOptions = {
6767
*/
6868
tabBarIcon?: (props: { focused: boolean }) => ImageSourcePropType | AppleIcon;
6969

70-
/**
71-
* Whether the tab bar item is visible when this screen is active.
72-
* Used for compatibility with JS Tabs. Prefer using `tabBarItemHidden` as this API may be removed in the future.
73-
*/
74-
tabBarButton?: () => null;
75-
7670
/**
7771
* Whether the tab bar item is visible. Defaults to true.
7872
*/

packages/react-navigation/src/views/NativeBottomTabView.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@ export default function NativeBottomTabView({
4242
getBadge={({ route }) => descriptors[route.key]?.options.tabBarBadge}
4343
getHidden={({ route }) => {
4444
const options = descriptors[route.key]?.options;
45-
46-
return (
47-
options?.tabBarItemHidden === true ||
48-
options?.tabBarButton?.() === null
49-
);
45+
return options?.tabBarItemHidden === true;
5046
}}
5147
getIcon={({ route, focused }) => {
5248
const options = descriptors[route.key]?.options;

0 commit comments

Comments
 (0)