useLink
is a React hook for managing Link
's state with React Router.
Link
's onFollow
prop
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>
);
}