I need to know whether it is able to achieve the behavior I want using react-native.
I am trying to find a way to navigate to specific screen that is created multiple times from one statically defined screen. First multiple screens are created by following:
this.props.navigation.push('tabScreen') // option 1
this.props.navigation.navigate({routeName: 'tabScreen', params: {}, key: uuid()}) // option 2
I am able to successfully create multiple same screen using stackNavigator, but the problem is that I need to be able to navigate or 'jump(not just going back to previous screen)' to any of the screens created without having to unmount the created screens.
so for example if I have Screen 1, Screen 2, Screen 3, Screen 4, Screen 5 I should be able to jump , or navigate
Screen 1 -> Screen 4
Screen 4 -> Screen 2
Screen 2 -> Screen 5
and so on without having to unmount the screens when navigating (exact behavior of tab feature in mobile browsers).
React-naivgation's stack navigator uses stack, so from what I understand it pops all the screens before navigating to a screen and therefore unmounts the screen.
Is such behavior achievable in navigation libraries in react-native?
If not where or how should I look into solving the problem?
Thanks