UNPKG

@appello/mobile

Version:

Common package with many useful features for mobile development

15 lines (14 loc) 441 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getRouteName = void 0; const getRouteName = (navState) => { if (!navState.state || navState.state.index === undefined) { return null; } const route = navState.state.routes[navState.state.index]; if (route.state) { return (0, exports.getRouteName)(route); } return route.name; }; exports.getRouteName = getRouteName;