next.js
d4b23403 - docs: clarify /_not-found failures and <html> attribute reads under Cache Components (#95163)

Commit
74 days ago
docs: clarify /_not-found failures and <html> attribute reads under Cache Components (#95163) ## Summary When the root layout reads request data (`cookies()`, `headers()`) under Cache Components, the validation error often surfaces on `/_not-found` — a real prerendered route that inherits the root layout, even though the user has no `not-found.tsx` file. This is consistently confusing (#67532), so: - `errors/blocking-prerender-runtime.mdx` and `errors/blocking-prerender-dynamic.mdx`: added a gotcha bullet pointing the fix at the root layout when the failing route is `/_not-found`. - `docs/01-app/02-guides/migrating-to-cache-components.mdx`: added a `Good to know` callout in the `cookies, headers, and searchParams` section linking to the existing [Themes recipe](/docs/app/guides/preventing-flash-before-hydration#themes) for the `<html data-theme>` case, since attributes on the root element can not be wrapped in `<Suspense>`. ## Verification - `npx alex` clean on all three files. <!-- NEXT_JS_LLM_PR --> --------- Co-authored-by: Joseph Chamochumbi <joseph.chamochumbi@vercel.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Author
Parents
Loading