Open florian-milky opened 4 years ago
I've noticed this today too. I believe it was a change that was introduced recently. I would love to know a fix for it.
For reference, in a Stack, the first route/screen is a Tab nav that contains different feeds. Pressing an item in the feed navigates to a details page, which is another screen in the stack, navigation.goBack()
resets the tab position.
I found a workaround which is to put your screen in a tab navigator at the top level navigation and hide it. See https://github.com/react-navigation/react-navigation/issues/4069
I am also interested in an official workaround for this
hmm would it work as expected if you use .push instead of .navigate ?
taken me round 6 hours to find this thread... Is there any solution?
BUMP. I was able to use a couple workarounds but now need some more nesting that keeps resetting the state of my webview when i navigate back to it. Would be really nice to get a solution to this
Current Behavior
From the docs:
then
It will unmount B, C and D. (btw I think this should be highlighted more in the docs) What if I want to keep let's say D mounted? And when I navigate to D again, I want to reuse the same instance.
My use case is a webview that I want to keep mounted in the background. I found an old question in stackoverflow, never answered https://stackoverflow.com/questions/41818857/keep-react-native-webview-mounted
Expected Behavior