next.js
c68d18c5 - fix(examples): resolve hydration mismatch in blog-starter (#87703)

Commit
32 days ago
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: Joseph <joseph.chamochumbi@vercel.com>
Author
Parents
Loading