Describe the bug
@refinedev/mui's ThemedTitle component renders nested <a> elements, which is invalid HTML and causes a hydration error in React 19.
The component wraps a MuiLink (which renders as <a> by default) inside a Refine Link (which also renders as <a>):
// packages/mui/src/components/themedLayout/title/index.tsx
<Link to="/" style={{ textDecoration: "none" }}> {/* → <a> */}
<MuiLink underline="none" ...> {/* → <a> (nested!) */}
...
</MuiLink>
</Link>
Error message
[browser] In HTML, <a> cannot be a descendant of <a>.
This will cause a hydration error.
[browser] <a> cannot contain a nested <a>.
Steps To Reproduce
- Use
ThemedLayout from @refinedev/mui with Next.js 16 + React 19
- Open the app in a browser
- Observe the hydration error in the browser console
Expected behavior
No nested <a> tags. MuiLink inside Link should not render as <a>.
Suggested fix
Replace MuiLink with Box (or add component="div") so the wrapper does not render as <a>:
<Link to="/" style={{ textDecoration: "none" }}>
<Box sx={{ display: "flex", alignItems: "center", gap: "12px", ...wrapperStyles }}>
...
</Box>
</Link>
Packages
System:
Refine Packages:
- @refinedev/core: 5.0.12
- @refinedev/mui: 8.0.2
- @refinedev/nextjs-router: 7.0.5
Other:
- Next.js: 16.2.6
- React: 19.2.6
Describe the bug
@refinedev/mui'sThemedTitlecomponent renders nested<a>elements, which is invalid HTML and causes a hydration error in React 19.The component wraps a
MuiLink(which renders as<a>by default) inside a RefineLink(which also renders as<a>):Error message
Steps To Reproduce
ThemedLayoutfrom@refinedev/muiwith Next.js 16 + React 19Expected behavior
No nested
<a>tags.MuiLinkinsideLinkshould not render as<a>.Suggested fix
Replace
MuiLinkwithBox(or addcomponent="div") so the wrapper does not render as<a>:Packages
System:
Refine Packages:
Other: