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
how the get the current route key #652
Comments
You access it with |
@junshengpierre |
@musicode Are you sure you are passing the right key? Passing a key into
Could it be that you are passing screen4Key thinking that it will navigate to screen4? |
@junshengpierre has the right answers here |
the stack is like how can i do that? |
Cannot access with
|
navigation.state.routes[state.index].key; Navigator has no property 'routes' |
I'm experiencing the same as @voidstarfire. No routes in the navigation state. |
+1 no routes in the navigation state, how can I get the routes? |
The state doesn't have routes or index. |
+1 |
Is there any solutions for this problem ? I think it confuses a lot of people, cause the function of getting current routes or index is important for us. |
+1 |
can someone who can explain this issue clearly and provide a reproducible example to demonstrate it on https://snack.expo.io or in a github repository, please create a new issue following the template? (please don't post your entire app, just a small one to reproduce the problem). thanks! |
route key' format is like
id-1489246424348-0
, it is useful withgoBack(key)
but how can i get the key?
The text was updated successfully, but these errors were encountered: