next.js
47d2dfdb - Update examples/active-class-name (#62506)

Commit
1 year ago
Update examples/active-class-name (#62506) ### Description The current implementation of the activeClassName example doesn't support the `UrlObject` type for the "href" Link prop. For example ``` <ActiveLink activeClassName="active" className="nav-link" href={{ pathname: "/[slug]", query: { slug: "dynamic-route", }, }} > Dynamic Route </ActiveLink> ``` won't work. ### Suggestion We can use the `resolveHref` function to handle all cases. Co-authored-by: Sam Ko <sam@vercel.com>
Parents
Loading