Code QuizIntermediate Fixing useNavigation Import
Spot the incorrect import that stops the useNavigation hook from working.
Codejavascript
import React from 'react';
import { Button } from 'react-native';
import { useNavigation } from '@react-navigation/stack';
function ProfileButton() {
const navigation = useNavigation();
return (
<Button
title="Go to Profile"
onPress={() => navigation.navigate('Profile')}
/>
);
}
export default ProfileButton;What is the bug that prevents this component from getting the navigation object?