Agile育成ブログ
未来を変える喜びを
未分類

usePathname


Warning: count(): Parameter must be an array or an object that implements Countable in /home/xs638785/agile-software.site/public_html/wp-content/plugins/rich-table-of-content/functions.php on line 490
'use client';

import { usePathname } from 'next/navigation';

export default function Page() {
  // When URL is /blog/hello, pathname = '/blog/hello'
  // When URL is /dashboard?v=2, pathname = '/dashboard'
  const pathname = usePathname();
  return <div>{pathname}</div>;
}

You cannot copy content of this page