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

Hook useLocation

What information does the useLocation hook provide?

Answer options

  • Only the current path (pathname)
  • Pathname, search, hash, state, and key
  • URL parameters and query string
  • The user's navigation history

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