Question · JavaScript and React course · Module 6: React Router

Hook useNavigate

What is the purpose of the useNavigate hook in React Router v6?

Answer options

  • Creating navigation links
  • Programmatic navigation in functional components
  • Checking the current location
  • Handling navigation errors

You can check the correct answer by solving this task in the CodeWorlds game.