Something went wrong. Try again.
a tool for shared writing and social publishing
Something went wrong. Try again.
538 B · 24 lines
TSX
12345678910111213141516171819202122232425"use client";import Link from "next/link";import { useState } from "react";
export function SpeedyLink(props: { href: string; className?: string; style?: React.CSSProperties; children?: React.ReactNode;}) { let [prefetch, setPrefetch] = useState(false); return ( <Link onMouseEnter={() => setPrefetch(true)} onPointerDown={() => setPrefetch(true)} style={props.style} prefetch={prefetch} href={props.href} className={props.className} > {props.children} </Link> );}