I wrote a function to return me the current route name but the problem is it only returns a stack navigation
getActiveRouteState = function (route) {
if (
!route.routes ||
route.routes.length === 0 ||
route.index >= route.routes.length
) {
return route;
}
const childActiveRoute = route.routes[route.index];
return this.getActiveRouteState(childActiveRoute);
};
is there any way I can get the current screen name with its tab navigation