I have a drawer navigation like that
const DrawerNavigatorRoutes = (props) => {
return (
<Drawer.Navigator>
<Drawer.Screen
name="homeScreenStack"
component={homeScreenStack}
/>
<Drawer.Screen
name="Profile"
component={profileScreenStack}
/>
</Drawer.Navigator>
);
};
When I click homeScreenStack the stack navigation is like that
const homeScreenStack = ({ navigation }) => {
return (
<Stack.Navigator initialRouteName="Dashboard">
<Stack.Screen
name="Dashboard"
component={Dashboard}
/>
<Stack.Screen
name="screen2"
component={screen2}
/>
....
</Stack.Navigator>
);
};
I also have some tab navigation in homeScreenStack So I want that when ever I click on homeScreenStack from drawer navigation Dashboard screen will open But in current scenario it didn't reset the stack. I am using react navigation 5