Answer the question
In order to leave comments, you need to log in
How to create navigation Screen and BottomTabs in conjunction?
I comprehend the basics of react native, in fact, a question arose when creating a router. How to link 2 different types of routing. Initially I did it like this
const Stack = createNativeStackNavigator();
const AppNavigation = () => {
return (
<NavigationContainer>
<Stack.Navigator initialRouteName={CATALOG}>
<Stack.Group>
<Stack.Screen key={CATALOG} name={CATALOG} component={component} />
<Stack.Screen key={PROFILE} name={PROFILE} component={component} />
<Stack.Screen key={CART} name={CART} component={component} />
<Stack.Screen key={CONTACTS} name={CONTACTS} component={component} />
<Stack.Screen key={STOCK} name={STOCK} component={component} />
</Stack.Group>
<Stack.Group screenOptions={{ presentation: 'modal' }}>
<Stack.Screen key={GIFT} name={GIFT} component={component} />
</Stack.Group>
</Stack.Navigator>
</NavigationContainer>
)
}
const App = () => {
return (
<AppNavigation />
);
};
const Tab = createBottomTabNavigator();
Answer the question
In order to leave comments, you need to log in
<Stack.Group screenOptions={{ presentation: 'modal' }}>
<Stack.Screen name={bottomtab} component={componentBottomTab} />
<Stack.Screen key={GIFT} name={GIFT} component={component} />
</Stack.Group>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question