Complete the code to import the navigation container component.
import { [1] } from '@react-navigation/native';
The NavigationContainer is the main component that manages navigation state and links your app to the navigation system.
Complete the code to create a stack navigator for screen flow.
const Stack = create[1]Navigator();The createStackNavigator function creates a stack-based navigation flow, where screens are placed on top of each other.
Fix the error in the code to navigate to the 'Profile' screen on button press.
navigation.[1]('Profile');
The navigate method is used to move to a different screen in the navigation stack.
Fill both blanks to define a screen inside the stack navigator.
<Stack.Screen name=[1] component=[2] />
The name prop is a string identifying the screen, and component is the React component to render.
Fill all three blanks to wrap the app with navigation and define a screen.
export default function App() {
return (
<[1]>
<Stack.Navigator>
<Stack.Screen name=[2] component=[3] />
</Stack.Navigator>
</[1]>
);
}The NavigationContainer wraps the navigator to manage navigation state. The screen name is a string, and the component is the screen UI.