# Function useLinkClickHandler

- useLinkClickHandler<E>(to, __namedParameters?): ((event) => void)

- 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>`.

  #### Type Parameters

  - E extends Element<E> = HTMLAnchorElement

  #### Parameters

  - to: To
  - `Optional` __namedParameters: {
    preventScrollReset?: boolean;
    relative?: RelativeRoutingType;
    replace?: boolean;
    state?: any;
    target?: HTMLAttributeAnchorTarget;
    unstable_viewTransition?: boolean;
    }

    - ##### `Optional` preventScrollReset?: boolean

    - ##### `Optional` relative?: RelativeRoutingType

    - ##### `Optional` replace?: boolean

    - ##### `Optional` state?: any

    - ##### `Optional` target?: HTMLAttributeAnchorTarget

    - ##### `Optional` unstable_viewTransition?: boolean

  #### Returns ((event) => void)

  - - (event): void

    - #### Parameters

      - event: React.MouseEvent<E, MouseEvent>

      #### Returns void

  - Defined in common/temp/node_modules/.pnpm/react-router-dom@6.23.1_react-dom@18.3.1+react@18.3.1/node_modules/react-router-dom/dist/index.d.ts:207