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