mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-09 17:23:18 +08:00
docs: Add comment to getScreen fix (#63)
This commit is contained in:
@@ -30,6 +30,9 @@ export default (routeConfigs, stackConfig = {}) => {
|
||||
|
||||
// Loop through routes and find child routers
|
||||
routeNames.forEach(routeName => {
|
||||
// We're not using `getScreenForRouteName` here to preserve the lazy loading
|
||||
// behaviour of routes. This means that routes with child routers must be
|
||||
// defined using a component directly or with an object with a screen prop.
|
||||
const routeConfig = routeConfigs[routeName];
|
||||
const screen =
|
||||
routeConfig && routeConfig.screen ? routeConfig.screen : routeConfig;
|
||||
|
||||
Reference in New Issue
Block a user