Complete the code to import the necessary navigator from React Navigation.
import { create[1]Navigator } from '@react-navigation/native-stack';
The createStackNavigator function is used to create a stack navigator in React Navigation.
Complete the code to define a nested navigator inside a parent navigator.
function ParentNavigator() {
return (
<Stack.Navigator>
<Stack.Screen name="Home" component={HomeScreen} />
<Stack.Screen name="[1]" component={ChildNavigator} />
</Stack.Navigator>
);
}The nested navigator is usually given a name like ChildStack to represent the nested stack.
Fix the error in the nested navigator component declaration.
const ChildNavigator = () => {
return (
<[1].Navigator>
<[1].Screen name="ChildHome" component={ChildHomeScreen} />
</[1].Navigator>
);
};The nested navigator uses the Stack object created by createStackNavigator().
Fill both blanks to correctly nest a Tab navigator inside a Stack navigator.
const Tab = create[1]Navigator(); function ChildNavigator() { return ( <Tab.[2]> <Tab.Screen name="TabHome" component={TabHomeScreen} /> </Tab.[2]> ); }
The createBottomTabNavigator creates a tab navigator, and Tab.Navigator is the component that wraps the screens.
Fill all three blanks to correctly set up a nested drawer navigator inside a stack navigator.
const Drawer = create[1]Navigator(); function ChildNavigator() { return ( <Drawer.[2]> <Drawer.[3] name="DrawerHome" component={DrawerHomeScreen} /> </Drawer.[2]> ); }
The drawer navigator is created with createDrawerNavigator, wrapped by Drawer.Navigator, and screens are added with Drawer.Screen.