-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this.props.navigation.goBack() not working in DrawerNavigator #4474
Comments
@ericvicenti - any idea what the justification is for react-navigation/src/routers/SwitchRouter.js Lines 166 to 167 in 89a24bd
|
If the action.key is specified, we should only let the matching router handle it. It sounds like the action key is incorrectly specified? If you want the deepest active router to handle the back action, it should have |
Same question and in contentComponent I can not get closeDrawer, is undefined |
@yoler - that is not at all the same question. that is fixed in 2.3.1 |
Having the same problem here. I made this snack based on the example in the docs |
fixed in 2.4.1 |
Thanks for your work! My solution is related to react-navigation/react-navigation-drawer#4 |
@brentvatne This doesn't seem to be completely fixed in 2.4.1. See my updated snack (https://snack.expo.io/@x11n/drawernavigator-goback). When you go to "Another Screen", then browse to "Notifications" and press Edit: This is because the goBack() listens to the |
those are the only two back behaviors available - none or initialRoute. this has always been the case. if you'd like to add more you can implement this rfc! react-navigation/rfcs#2 |
Ok, let's make this straight. I am new in 'react-native'/'react-navigation'.
I've two screens, let's say A and B.It's wrapped under a
DrawerNavigator
. The screenA
is theinitialRoute
, and when a button clicks fromA
, it navigates toB
usingthis.props.navigation.navigate('B');
, but when i try togoBack
from B usingthis.props.navigation.goBack()
. It doesn't work.I've googled a lot, but couldn't find anything helpful. Why it's not working ? Am i missing something?
The text was updated successfully, but these errors were encountered: