Complete the code to import the drawer navigator from React Navigation.
import { create[1]Navigator } from '@react-navigation/drawer';
The drawer navigator is created using createDrawerNavigator from @react-navigation/drawer.
Complete the code to create a drawer navigator instance.
const Drawer = create[1]Navigator();You create a drawer navigator instance by calling createDrawerNavigator().
Fix the error in the drawer navigator screen declaration.
<Drawer.Navigator> <Drawer.Screen name="Home" component=[1] /> </Drawer.Navigator>
The component prop expects a React component, like HomeScreen, not a string or other value.
Fill both blanks to add a drawer screen with a custom title.
<Drawer.Screen name="Profile" component=[1] options={{ title: [2] }} />
The component should be the screen component, and the title option is a string shown in the drawer.
Fill all three blanks to create a drawer navigator with two screens.
function MyDrawer() {
return (
<Drawer.Navigator>
<Drawer.Screen name=[1] component=[2] />
<Drawer.Screen name=[3] component={SettingsScreen} />
</Drawer.Navigator>
);
}The first screen's name is "Home" and its component is HomeScreen. The second screen's name is "Settings" with component SettingsScreen.