Skip to main content

Function: usePrefetchEndorsements()

usePrefetchEndorsements(): (eprintUri) => void

Defined in: web/lib/hooks/use-endorsement.ts:533

Hook for prefetching endorsements on hover/focus.

Returns​

Function

Function to prefetch endorsements for an eprint

Parameters​

eprintUri​

string

Returns​

void

Remarks​

Improves perceived performance by loading endorsement data before the user interacts with the endorsement panel.

Example​

const prefetchEndorsements = usePrefetchEndorsements();

return (
<EprintCard
onMouseEnter={() => prefetchEndorsements(eprint.uri)}
/>
);