Closed VictorioMolina closed 3 years ago
Solved with:
<Tab.Screen
name="Profile"
component={ProfileStacks}
listeners={({ navigation, route }) => ({
tabPress: () => {
if (route.state?.routes.length > 1) {
navigation.popToTop();
}
},
})}
/>
I have a stack, which is created with "createSharedElementStackNavigator" inside a tab navigator from react-navigation-5
Previously, I was using the default stacks provided by react-navigation-5, but now, as I need to create a shared transition, I have replaced it.
Before, the default behaviour when pressing an active tab (which content is a stack) was to:
Now, with createSharedElementStackNavigator, nothing happens when I press the tab from my TabNavigator.
Is it possible to reach this same behaviour with this library?