App Router

acme.com
/books/fiction/
Client Component Hooks
{
  "useSelectedLayoutSegment": "books",
  "useSelectedLayoutSegments": [
    "books",
    "fiction"
  ]
}
children
Client Component Hooks
{
  "useSelectedLayoutSegment": "fiction",
  "useSelectedLayoutSegments": [
    "fiction"
  ]
}
children

Fiction

Client Component Hooks
{
  "usePathname": "/hooks/books/fiction",
  "useParams": {
    "categorySlug": "books",
    "subCategorySlug": "fiction"
  },
  "useSearchParams": {},
  "useSelectedLayoutSegment": null,
  "useSelectedLayoutSegments": []
}