Closed UIT19521334 closed 6 months ago
This is my code and router name allway given = (tabs) when i change tab what shoud i do
import { useRoute } from '@react-navigation/native'; export default function Layout() { const route = useRoute(); return ( <Tabs initialRouteName="(drawer)" // initialRouteName is directory name or filename screenOptions={{ // https://reactnavigation.org/docs/native-stack-navigator#props headerStyle: { backgroundColor: '#f4511e', }, headerTintColor: '#fff', headerTitleStyle: { fontWeight: 'bold', }, tabBarIcon: ({ focused, color, size }) => { console.log(focused); let iconName; console.log(route.name);}, }}> <Tabs.Screen name="(drawer)" // name prop is directory name or filename options={{ tabBarBadge: 3 }} /> <Tabs.Screen name="profile/index" // name prop is directory name or filename options={{ }} /> </Tabs>
This is my code and router name allway given = (tabs) when i change tab what shoud i do