docs: Add comment to getScreen fix (#63)

This commit is contained in:
Janic Duplessis
2019-05-21 18:02:13 -04:00
parent 720f943fcf
commit 7dc8819280

View File

@@ -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;