From b7fee5388cc0dd988d38bd20340cad1cce88fa19 Mon Sep 17 00:00:00 2001 From: Josh Black Date: Mon, 26 Feb 2024 16:42:10 -0600 Subject: [PATCH] docs(examples): update App Router example to avoid hydration mismatch --- examples/app-router/package.json | 2 ++ examples/app-router/src/app/layout.tsx | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/app-router/package.json b/examples/app-router/package.json index dfc5fe95980..7f0f402e5ab 100644 --- a/examples/app-router/package.json +++ b/examples/app-router/package.json @@ -3,7 +3,9 @@ "private": true, "scripts": { "clean": "rimraf .next", + "build": "next build", "develop": "next", + "start": "next start", "type-check": "tsc --noEmit" }, "dependencies": { diff --git a/examples/app-router/src/app/layout.tsx b/examples/app-router/src/app/layout.tsx index b321ef18d84..50891518707 100644 --- a/examples/app-router/src/app/layout.tsx +++ b/examples/app-router/src/app/layout.tsx @@ -8,7 +8,9 @@ export const metadata = { export default function RootLayout({children}: {children: React.ReactNode}) { return ( - + // Note: the `ThemeProvider` component will set attributes on `html` once + // they load on the client that will cause a hydration mismatch +