Complete the code to install the core React Navigation package using npm.
npm install [1]The core React Navigation package is @react-navigation/native. Installing it sets up the base navigation library.
Complete the command to install dependencies required by React Navigation for React Native projects.
npm install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context [1]The package @react-native-community/masked-view is required for proper screen transitions in React Navigation.
Fix the error in the import statement to use the correct React Navigation hook.
import { [1] } from '@react-navigation/native';
The correct hook to access navigation object is useNavigation. useNavigate and useRouter are from other libraries.
Fill both blanks to complete the code that wraps the app with the Navigation container.
import { NavigationContainer } from '[1]'; export default function App() { return ( <[2]> {/* Your app screens here */} </[2]> ); }
The NavigationContainer component from @react-navigation/native wraps the app to manage navigation state.
Fill all three blanks to complete the code that installs and links React Navigation dependencies on iOS.
npx pod-install [1] npx react-native [2] react-native-gesture-handler npx react-native [3]
First, pods are installed in the iOS project directory. Then dependencies are linked. Finally, the app is run on iOS simulator.