You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create breadcrumbs that dynamically reflect route parameters in Nuxt, specifically for routes with dynamic segments. For example, when editing a user at the route /users/:userId/edit, the breadcrumbs should look like this: Users > :userId > Edit.
I understand that I can use overrides with useBreadcrumbItems() to manually define the breadcrumb structure, but the challenge arises when different routes require different overrides. Since useBreadcrumbItems() can only be used at the top level of the setup function, I am unable to recreate or modify the breadcrumb items based on route changes. This results in errors when trying to update the breadcrumbs dynamically as the route changes.
Is there a recommended way to handle this scenario where breadcrumbs need to be updated dynamically based on route parameters?
The text was updated successfully, but these errors were encountered:
I am trying to create breadcrumbs that dynamically reflect route parameters in Nuxt, specifically for routes with dynamic segments. For example, when editing a user at the route
/users/:userId/edit
, the breadcrumbs should look like this:Users > :userId > Edit
.I understand that I can use overrides with
useBreadcrumbItems()
to manually define the breadcrumb structure, but the challenge arises when different routes require different overrides. SinceuseBreadcrumbItems()
can only be used at the top level of thesetup
function, I am unable to recreate or modify the breadcrumb items based on route changes. This results in errors when trying to update the breadcrumbs dynamically as the route changes.Is there a recommended way to handle this scenario where breadcrumbs need to be updated dynamically based on route parameters?
The text was updated successfully, but these errors were encountered: