Skip to content

Instantly share code, notes, and snippets.



Created Jun 9, 2018
What would you like to do?
Retrieving routeName from react-navigation state (redux implementation)
* @description Returns current route name.
* @param routes
* @returns {string}
getRouteNameFromNavigatorState ({ routes }) {
let route = routes[routes.length - 1];
while (route.index !== undefined) route = route.routes[route.index];
return route.routeName;
// UserProfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.