Kliknij w kolejności · Kurs Next.js · Moduł 2: Routing i layouty

Składnia usePathname w komponencie

Ułóż składnię usePathname w komponencie

Elementy do kliknięcia

  • { usePathname }
  • import
  • 'use client'
  • 'next/navigation'
  • const pathname = usePathname()
  • from
Pokaż odpowiedź

Poprawna kolejność:

  1. 'use client'
  2. import
  3. { usePathname }
  4. from
  5. 'next/navigation'
  6. const pathname = usePathname()