Skip to content

Commit 153f5f7

Browse files
authored
fix: remove tab bar icon workaround (#157)
* fix: remove tab bar icon workaround * Create bright-pianos-invite.md
1 parent f128b02 commit 153f5f7

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

.changeset/bright-pianos-invite.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@bottom-tabs/react-navigation": patch
3+
---
4+
5+
fix: remove `tabBarIcon` from experimental API

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)