Head component not working #53529
-
SummaryI am using the export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<Head>
<title key="title">vg</title>
</Head>
<body className={inter.className}>{children}</body>
</html>
);
} but it is not working, when i open the browser the title is not there, I also inspect and saw that there is no title tag in the head tag in html. Can anyone please tell me how to make things work? Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
Hi, The next/head component does not work in App Router. You can use the Head is only listed for It is nowhere to be found in App Router docs: ![]() |
Beta Was this translation helpful? Give feedback.
-
I'm trying to insert |
Beta Was this translation helpful? Give feedback.
-
How can I add custom <style> tag in app router? |
Beta Was this translation helpful? Give feedback.
Hi,
The next/head component does not work in App Router. You can use the
metadata
object instead.Head is only listed for
Pages Router
:It is nowhere to be found in App Router docs: