Skip to main content

Function: usePrefetchField()

usePrefetchField(): (id) => void

Defined in: web/lib/hooks/use-field.ts:300

Hook for prefetching a field on hover/focus.

Returns

Function

Function to prefetch a field by ID

Parameters

id

string

Returns

void

Remarks

Improves perceived performance by loading field data before navigation.

Example

const prefetchField = usePrefetchField();

<FieldLink
onMouseEnter={() => prefetchField(fieldId)}
href={`/fields/${fieldId}`}
/>