I am currently developing a React Native application using TypeScript and functional components. My app has a deep level of nesting in its stack navigation.
App: {
NavigationConatainer: {
DrawerNavigation: {
StackNavigator1: {
HomeScreen,
DetailedScreen,
ButtonTabNavigator: {
InfoScreen,
StackNavigation2: {
MainScreen,
SubScreen1,
SubScreen2,
},
MetaScreen
}
}
},
SomeCustomDrawerItems,
}
}
I hope this gives you an idea of the architecture.
However, I am facing two issues:
- The SubScreen1 appears above the Tab of ButtonTabNavigation.
- How can I hide the header from StackNavigation1 on SubScreen1 and 2, and show the new header from StackNavigation2?
It seems like the stacks are overlapping. When pressing the back button on SubScreen1, it navigates to DetailedScreen from StackNavigation1.
Is there anyone who knows how to properly implement nested stacks like this?