Breadcrumb Hydration Error #4416
Unanswered
piyusharmap
asked this question in
Q&A
Replies: 2 comments
-
It is necessary to update the examples in the Breadcrumb documentation. https://ui.shadcn.com/docs/components/breadcrumb#link-component |
Beta Was this translation helpful? Give feedback.
0 replies
-
Another way that also works is to omit the BreadcrumbLink component. <Breadcrumb>
<BreadcrumbList>
<BreadcrumbItem>
<Link href="/">Home</Link>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbPage>Breadcrumb</BreadcrumbPage>
</BreadcrumbItem>
</BreadcrumbList>
</Breadcrumb>``` |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As per the documentation, using Link inside BreadcrumbLink throws a hydration error. This happens because both BreadcrumbLink and Link are rendered as tags, which results in nesting two tags. To avoid this issue, you should omit the use of Link when using BreadcrumbLink.
To solve this I simply used the href attribute inside the
BreadcrumbLink
.Beta Was this translation helpful? Give feedback.
All reactions