useHref
On this page

useHref

Summary

Reference Documentation ↗

Resolves a URL against the current location.

import { useHref } from "react-router";

function SomeComponent() {
  let href = useHref("some/where");
  // "/resolved/some/where"
}

Signature

useHref(to, __namedParameters): string

Params

to

No documentation

__namedParameters

No documentation

Docs and examples CC 4.0