mirror of
https://github.com/Dvorinka/Devour.git
synced 2026-06-03 20:13:03 +00:00
17 lines
1.4 KiB
JSON
17 lines
1.4 KiB
JSON
{
|
|
"id": "db629769d88bb593b9571f3a",
|
|
"source": "solid:signals",
|
|
"type": "github-document",
|
|
"title": "use-current-matches",
|
|
"content": "---\ntitle: useCurrentMatches\nuse_cases: \u003e-\n breadcrumbs, route metadata, nested routes, navigation menus, route info\n extraction\ntags:\n - routes\n - breadcrumbs\n - matches\n - navigation\n - metadata\nversion: '1.0'\ndescription: \u003e-\n Access all matched route information with useCurrentMatches - build\n breadcrumbs, extract route metadata, and navigate nested routes.\n---\n\n`useCurrentMatches` returns all the matches for the current matched route. Useful for getting all the route information.\n\nFor example if you stored breadcrumbs on your route definition you could retrieve them like so:\n\n```js\nconst matches = useCurrentMatches();\nconst breadcrumbs = createMemo(() =\u003e\n\tmatches().map((m) =\u003e m.route.info.breadcrumb)\n);\n```",
|
|
"url": "https://github.com/solidjs/solid-docs/blob/HEAD/src/routes/solid-router/reference/primitives/use-current-matches.mdx",
|
|
"metadata": {
|
|
"path": "src/routes/solid-router/reference/primitives/use-current-matches.mdx",
|
|
"repo": "solidjs/solid-docs",
|
|
"repo_url": "https://github.com/solidjs/solid-docs.git",
|
|
"size": 730,
|
|
"source_type": "github"
|
|
},
|
|
"hash": "06ed13389ea52ecd086eb8d93c3efaf9548ee40c87aaf8b25cd87dac8f3985ae",
|
|
"timestamp": "2026-02-23T11:43:00.192999971+01:00"
|
|
} |