The useLinkProps hook that takes an object as its argument and returns a React.AnchorHTMLAttributes<HTMLAnchorElement> props object. These props can then be safely applied to an anchor element to create a link that can be used to navigate to the new location. This includes changes to the pathname, search params, hash, and location state.
type UseLinkPropsOptions = ActiveLinkOptions &
React.AnchorHTMLAttributes<HTMLAnchorElement>
type UseLinkPropsOptions = ActiveLinkOptions &
React.AnchorHTMLAttributes<HTMLAnchorElement>
Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.