usePathname is a hook that can be used to get current URL's pathname
import { usePathname } from "another-react-router" export const Component = () => { const pathname = usePathname() return <div>Current pathname: {pathname}</div> }