useLinkClickHandler
Handles the click behavior for router <Link>
components. This is useful if
you need to create custom <Link>
components with the same click behavior we
use in our exported <Link>
.
function useLinkClickHandler<E extends Element = HTMLAnchorElement>(to: To, { target, replace: replaceProp, state, preventScrollReset, relative }?: {
target?: React.HTMLAttributeAnchorTarget;
replace?: boolean;
state?: any;
preventScrollReset?: boolean;
relative?: RelativeRoutingType;
}): (event: React.MouseEvent<E, MouseEvent>) => void;§
useLinkClickHandler<E extends Element = HTMLAnchorElement>(to: To, { target, replace: replaceProp, state, preventScrollReset, relative }?: {
[src]target?: React.HTMLAttributeAnchorTarget;
replace?: boolean;
state?: any;
preventScrollReset?: boolean;
relative?: RelativeRoutingType;
}): (event: React.MouseEvent<E, MouseEvent>) => void§Parameters
§
{ target, replace: replaceProp, state, preventScrollReset, relative }?: {
[src]target?: React.HTMLAttributeAnchorTarget;
replace?: boolean;
state?: any;
preventScrollReset?: boolean;
relative?: RelativeRoutingType;
} optional§Return Type
§
(event: React.MouseEvent<E, MouseEvent>) => void
[src]