This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
meta tag in Head from next/head is not working in app router next js #68660
Labels
examples
Issue was opened via the examples template.
Verify canary release
Provide environment information
Which example does this report relate to?
layout.tsx
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
the meta tags in next js page router was working fine and not in app router layout
Expected Behavior
import "@/styles/globals.css";
import type { AppProps } from "next/app";
import Head from "next/head";
export default function App({ Component, pageProps }: AppProps) {
return (
<>
<title>Ttitle</title>
);
}
To Reproduce
"use client";
import { Rubik } from "next/font/google";
import "./globals.css";
import Head from "next/head";
const rubik = Rubik({
subsets: ["latin", "cyrillic"],
weight: ["300", "400", "500", "600", "700", "800", "900"],
});
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<>
<title>Title</title>
<body className={rubik.className + " fixed h-screen w-screen"}>
{children}
</>
);
}
The text was updated successfully, but these errors were encountered: