getCurrentRouteFromNavigationState
Akash Yadav

Akash Yadav @akash32755

About: React Native developer (Android & iOS) || Intermediate || Expo & Cli || Axios, UI designer, API Integration, Development App on PlayStore and App Store

Location:
Delhi, India
Joined:
Feb 12, 2024

getCurrentRouteFromNavigationState

Publish Date: Mar 1 '24
0 0
function getCurrentRouteFromNavigationState(navigationState) {
    if (!navigationState) return null;
    const route = navigationState.routes[navigationState.index];
    if (route.state) return getCurrentRouteFromNavigationState(route.state);
    return route.name;
}
Enter fullscreen mode Exit fullscreen mode

Comments 0 total

    Add comment