# pf-intent-prefetch: Prefetch on User Intent (Hover, Focus)
## Priority: MEDIUM
## Explanation
Prefetch data when users show intent to navigate (hover, focus) rather than waiting for click. This eliminates perceived loading time for likely next actions.
## Bad Example
```tsx
// No prefetching - data fetches on click
function PostList({ posts }: { posts: Post[] }) {
return (
{posts.map(post => (
{post.title}
{/* User clicks, waits for data to load */}
))}
)
}
```
## Good Example
```tsx
import { useQueryClient } from '@tanstack/react-query'
import { postQueries } from '@/lib/queries'
function PostList({ posts }: { posts: Post[] }) {
const queryClient = useQueryClient()
const handlePrefetch = (postId: number) => {
queryClient.prefetchQuery({
...postQueries.detail(postId),
staleTime: 60 * 1000, // Consider fresh for 1 minute
})
}
return (