Unverified Commit c68d18c5 authored by Nhan Nguyen's avatar Nhan Nguyen Committed by GitHub

fix(examples): resolve hydration mismatch in blog-starter (#87703)

## What?
Add `suppressHydrationWarning` to the `<html>` element in the
blog-starter example.

## Why?
The ThemeSwitcher script runs before React hydration and adds `dark`
class and `data-mode` attribute to the `<html>` element, causing a
hydration mismatch error.

## How?
Add `suppressHydrationWarning` to the `<html>` element to tell React
this mismatch is intentional.

Fixes #74586
Co-authored-by: 's avatarJoseph <joseph.chamochumbi@vercel.com>
parent 2446efea
......@@ -23,7 +23,7 @@ export default function RootLayout({
children: React.ReactNode;
}>) {
return (
<html lang="en">
<html lang="en" suppressHydrationWarning>
<head>
<link
rel="apple-touch-icon"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment