Skip to content

Glossary: Next.js Basics

usePathname

A hook from `next/navigation` that returns the browser's current path, such as "/shop/coffee". `NavLinks` uses it to highlight the current page.

Where the book teaches it

Related terms

Client Component