Function: usePrefetchEndorsements()
usePrefetchEndorsements(): (
preprintUri) =>void
Defined in: web/lib/hooks/use-endorsement.ts:497
Hook for prefetching endorsements on hover/focus.
Returns
Function
Function to prefetch endorsements for a preprint
Parameters
preprintUri
string
Returns
void
Remarks
Improves perceived performance by loading endorsement data before the user interacts with the endorsement panel.
Example
const prefetchEndorsements = usePrefetchEndorsements();
return (
<PreprintCard
onMouseEnter={() => prefetchEndorsements(preprint.uri)}
/>
);