fix: tweak error message when navigator has non-screen children

This commit is contained in:
Satyajit Sahoo
2020-11-07 16:43:45 +01:00
parent e50c8aa942
commit 360b0e9958

View File

@@ -93,7 +93,7 @@ const getRouteConfigsFromChildren = <
`A navigator can only contain 'Screen' components as its direct children (found '${
// @ts-expect-error: child can be any type and we're accessing it safely, but TS doesn't understand it
child.type?.name ? child.type.name : String(child)
}')`
}'). To render this component in the navigator, pass it in the 'component' prop to 'Screen'.`
);
}, []);