Next.js · Junior · Question 62 of 75
What is the useLinkStatus hook for?
function Hint() {
const { pending } = useLinkStatus()
return <span className={pending ? 'spinner' : ''} />
}- ✓Correct answer: Showing inline pending feedback inside a
<Link>while its navigation completes - 2Checking if a URL returns 404
- 3Counting how many times a link was clicked
Explanation
It must be used in a descendant of <Link>. Prefer loading.tsx and prefetching for instant navigations; the hook is a patch for slow transitions.