mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-13 09:39:18 +08:00
10 lines
278 B
TypeScript
10 lines
278 B
TypeScript
export default function getChildRouter(router: any, routeName: string) {
|
|
if (router.childRouters && router.childRouters[routeName]) {
|
|
return router.childRouters[routeName];
|
|
}
|
|
|
|
const Component = router.getComponentForRouteName(routeName);
|
|
|
|
return Component.router;
|
|
}
|