Is there a way to keep some screen alive after goBack (similar as the drawer navigator do) in stackNavigator?
Riant
I have a screen which will show a webview for a Vuejs-spa in a stackNavigator. so I want to keep it always alive even I back to the parent screen. So when I navigate into this screen, i just need to replace the route-state in the webview, but do not need to reload all.
For now, I have to use createDrawerNavigator, set the webview screen as a 100%-width contentComponent or a DrawerNavigator-screen. But the back behavior is different from the other stack screen, and gesture-back is not support on iOS.
So is there a better way for that case?
Trevor Poppen
I think what you want to use is a tab navigator or a switch navigator. By definition, stack means it will pop it off. If you run with a switch navigator you can have it still exist and switch between your stack and your web view whenever you like, and it should remain in tact in the background.