react-navigation / react-navigation

Routing and navigation for your React Native apps
https://reactnavigation.org
23.3k stars 4.97k forks source link

7.0.0-alpha.15 @react-navigation/material-top-tabs - tabBarIcons are not showing. #11904

Closed schoy3 closed 1 month ago

schoy3 commented 1 month ago

Current behavior

tabBarIcon are not showing in the tab bar.

Expected behavior

The tabBarIcon should display an icon in the top tab bar. Example code:

import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs'; const Tab = createMaterialTopTabNavigator();

export default function Example({ navigation, route }) { return ( <Tab.Navigator screenOptions={{ tabBarShowIcon: true }} > <Tab.Screen options={{ tabBarIcon: () => }} name="Screen1" component={Screen1} /> </Tab.Navigator> ); }

Reproduction

https://snack.expo.dev/@schoy2/top-navigation-icons

Platform

Packages

Environment

package version
@react-navigation/native 7.0.0-alpha.15
@react-navigation/bottom-tabs 7.0.0-alpha.18
@react-navigation/drawer 7.0.0-alpha.16
@react-navigation/material-top-tabs 7.0.0-alpha.15
@react-navigation/stack 7.0.0-alpha.16
@react-navigation/native-stack 7.0.0-alpha.16
react-native-safe-area-context 4.7.1
react-native-screens 3.29.0
react-native-gesture-handler 2.15.0
react-native-reanimated 3.8.1
react-native-pager-view 6.2.2
react-native 0.73.6
node 18
npm or yarn yarn
github-actions[bot] commented 1 month ago

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

github-actions[bot] commented 1 month ago

Hey @schoy3! Thanks for opening the issue. It seems that the issue doesn't contain a link to a repro.

The best way to get attention to your issue is to provide an easy way for a developer to reproduce the issue.

You can provide a repro using any of the following:

migueldaipre commented 1 month ago

Please add a minimal repro

schoy3 commented 1 month ago

@migueldaipre Here is my expo snack: https://snack.expo.dev/@schoy2/top-navigation-icons