• Returns a resolved URL path for the specified route.

    const h = href("/:lang?/about", { lang: "en" })
    // -> `/en/about`

    <Link to={href("/products/:id", { id: "abc123" })} />

    Type Parameters

    • Path extends string

    Parameters

    • path: Path
    • Rest...args: [] | [AnyParams]

    Returns string