Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Latest commit

 

History

History
32 lines (22 loc) · 529 Bytes

use-link.md

File metadata and controls

32 lines (22 loc) · 529 Bytes

useLink

useLink is a React hook for managing Link's state with React Router.

Table of Contents

State

handleFollow

Link's onFollow prop

Examples

import Link from '@awsui/components-react/link';
import { useLink } from 'use-next-awsui';

export default function MyLink() {
  const { handleFollow } = useLink();

  return (
    <Link href="/my-href" onFollow={handleFollow}>
      my link
    </Link>
  );
}