Resolves the pathname of the given to value against the current location. Similar to useHref, but returns a Path instead of a string.
import { useResolvedPath } from"react-router"
functionSomeComponent() { // if the user is at /dashboard/profile letpath = useResolvedPath("../accounts") path.pathname// "/dashboard/accounts" path.search// "" path.hash// "" }
Resolves the pathname of the given
to
value against the current location. Similar to useHref, but returns a Path instead of a string.