# Function useLocation

- useLocation(): Location

- Returns the current location object, which represents the current URL in web browsers.

  Note: If you're using this it may mean you're doing some of your own "routing" in your app, and we'd like to know what your use case is. We may be able to provide something higher-level to better suit your needs.

  #### Returns Location

  #### See

  https://reactrouter.com/hooks/use-location

  - Defined in common/temp/node_modules/.pnpm/react-router@6.23.1_react@18.3.1/node_modules/react-router/dist/lib/hooks.d.ts:30