Только начал изучать Next и сразу же столкнулся с такой ошибкой, как ее исправить?
Ошибка:
Error: Hydration failed because the initial UI does not match what was rendered on the server.
Warning: Expected server HTML to contain a matching in .
See more info here: https://nextjs.org/docs/messages/react-hydration-error
Код:
import type { Metadata } from "next";
import Header from "<@>/app/components/header";
import { Roboto } from "next/font/google";
const roboto = Roboto({ weight: "300", subsets: ["latin"] });
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
};
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<Header />
<body className={roboto.className}>{children}</body>
</html>
);
}