react-navigation
react-navigation copied to clipboard
Error Drawer goBack() away back to HomeScreen
Current behavior
Click ModalScreen Go to Modal Screen Detail. Click Go back ModalScreen on Screen "ModalScreenDetail" but goBack to HomeScreen.
V5 run ok
Expected behavior
Click Go back ModalScreen on Screen "ModalScreenDetail" goBack to ModalScreen.
Reproduction
https://snack.expo.dev/@longdv/f81732
Platform
- [X] Android
- [X] iOS
- [ ] Web
- [ ] Windows
- [ ] MacOS
Packages
- [X] @react-navigation/bottom-tabs
- [X] @react-navigation/drawer
- [ ] @react-navigation/material-bottom-tabs
- [ ] @react-navigation/material-top-tabs
- [X] @react-navigation/stack
- [ ] @react-navigation/native-stack
Environment
- [] I've removed the packages that I don't use
package | version |
---|---|
@react-navigation/native | |
@react-navigation/bottom-tabs | |
@react-navigation/drawer | |
@react-navigation/material-bottom-tabs | |
@react-navigation/material-top-tabs | |
@react-navigation/stack | |
@react-navigation/native-stack | |
react-native-safe-area-context | |
react-native-screens | |
react-native-gesture-handler | |
react-native-reanimated | |
react-native-tab-view | |
react-native-pager-view | |
react-native | |
expo | |
node | |
npm or yarn |
Couldn't find version numbers for the following packages in the issue:
-
@react-navigation/native
-
@react-navigation/bottom-tabs
-
@react-navigation/drawer
-
@react-navigation/material-bottom-tabs
-
@react-navigation/material-top-tabs
-
@react-navigation/stack
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.
Adding myself to this issue - V6 goBack() really fails with react native drawer.
import { useNavigation } from '@react-navigation/native'; const Screen1 = () => { const {goBack} = useNavigation() return ( <Layout> <ImageBackground style={styles.image} source={require("../../assets/6.png")}> <TouchableOpacity style={styles.rightArrow} onPress={() => { goBack(); //this goes to the home screen no matter what. }}> <Image source={require("../../assets/left_arrow.png")} style={styles.responsiveImage}/> </TouchableOpacity> </ImageBackground> </Layout> ) }
@jaroslavhuss @react-navigation/drawer > v5 Erorr