The Link component does more than href
<Link> performs client-side transitions, prefetches the destination route, and preserves layout state. Use it for any in-app navigation. Plain tags trigger full reloads.
Programmatic navigation
Inside Client Components, useRouter() from next/navigation lets you navigate from code. Server Components can call redirect().
The hooks you actually use
| Hook | Returns | Where |
|---|---|---|
useRouter() | Router methods (push, replace, refresh) | Client |
usePathname() | Current pathname string | Client |
useSearchParams() | URLSearchParams | Client |
useSelectedLayoutSegment() | Active child segment of the current layout | Client |
Choose navigation primitives by semantics. A destination users can open in a new tab, copy, or index is a link. A redirect caused by a successful server operation belongs in server control flow. Imperative client navigation is for behavior that is genuinely the result of an interaction, not a substitute for anchors. Prefetch is useful work only when the destination is likely to be visited. A screen with hundreds of dynamic links can spend bandwidth and server capacity on routes nobody opens. Include unclicked work when evaluating navigation performance.
Compare Link, a plain anchor, router.push, and server redirect while watching network traffic and layout mounts. Test new-tab, copy-link, and back-button behavior. The fastest click is not a win if browser conventions disappear.