
I am using React Native for Android Application and React Navigation. Now at Screen 0 (S0). Then did following navigations.
this.props.navigation.navigate("S1")this.props.navigation.navigate("A1")this.props.navigation.navigate("A2")this.props.navigation.navigate("A3")
Now, once Actions in A3 is done, I have to navigate back to Screen 1 (S1). However, if I use this.props.navigation.navigate("S1"), what happened is that I can Press Back button (hardware or Header bar) and it go back to Screen A3.
When the back button is pressed on S1, I want to go back to S0. I don't want to set it manually as well because many other pages can come to S1.
Any suggestions or ideas how to make this work? I have tried popToTop() and goBack("A") but both are not working.