- useLinkClickHandler<E>(to, __namedParameters?): ((event: React.MouseEvent<E, MouseEvent>) => void)
类型参数
- E extends Element = HTMLAnchorElement
参数
- to: To
- __namedParameters: {
preventScrollReset?: boolean;
relative?: RelativeRoutingType;
replace?: boolean;
state?: any;
target?: HTMLAttributeAnchorTarget;
viewTransition?: boolean;
} = {}Optional
preventScrollReset?: boolean
Optional
replace?: boolean
Optional
state?: any
Optional
target?: HTMLAttributeAnchorTarget
Optional
viewTransition?: boolean
返回值 ((event: React.MouseEvent<E, MouseEvent>) => void)
- (event): void
参数
- event: React.MouseEvent<E, MouseEvent>
返回值 void
处理路由器
<Link>
组件的点击行为。如果您需要创建具有与我们导出的<Link>
中使用的相同点击行为的自定义<Link>
组件,这将非常有用。