I have small issue with react navigation v6...
Drawer Navigation:
<Drawer.Navigator drawerContent={(props) => <CustomDrawer {...props} />} >
<Drawer.Screen name="Search" component={MainStackNavigator} />
<Drawer.Screen name="Contact" component={ContactScreen} />
</Drawer.Navigator>
Stack navigation:
const MainStackNavigator = () => {
return (
<Stack.Navigator initialRouteName="OffersList">
<Stack.Screen name="OffersList" component={OffersList} />
<Stack.Screen name="OfferDetails" component={OfferDetails} />
</Stack.Navigator>
);
};
and now, when I click on the element Search in drawer navigation then OffersList page is displayed. Next, on the OffersList, when I click on any offer link, then I see OfferDetails view (Stack Navigation) - every thing is ok. Then, when I click on the Contact in drawer nav, and again on Search then I see last opened OfferDetails instead of OfferList. How can I reset this stack navigation when i navigate by drawer?