Skip to main content

Function: usePrefetchAuthor()

usePrefetchAuthor(): (did) => void

Defined in: web/lib/hooks/use-author.ts:253

Hook for prefetching an author profile on hover/focus.

Returns​

Function

Function to prefetch an author by DID

Parameters​

did​

string

Returns​

void

Remarks​

Improves perceived performance by loading author data before navigation.

Example​

const prefetchAuthor = usePrefetchAuthor();

<AuthorLink
onMouseEnter={() => prefetchAuthor(did)}
href={`/authors/${did}`}
/>