Goal: Trying to set types on navigation
for a Tab screen navigating to a child Stack screen
Navigator Structure: TabNavigator
parent that renders a StackNavigator
const HomeStackScreen = () => (<HomeStack.Navigator><HomeStack.Screen name="Home" component={HomeScreen} /><HomeStack.Screen name="Person" component={PersonScreen} /></HomeStack.Navigator> ); return (<Tab.Navigator><Tab.Screen name="HomeStack" component={HomeStackScreen} /><Tab.Screen name="AddPerson" component={AddPersonScreen} /></Tab.Navigator> );
Problem: When using CompositeScreenProps
, the route
prop is typed but navigator
prop isn't.
Questions:
- Why is the route typed but
navigation
not? - Is it ok to render a Tab as parent to Stack?
- How do I get the
navigation
to be typed?