Commit Graph

3 Commits

Author SHA1 Message Date
Aurora Scharff 053300c1fb docs: improve blocking-route error page for params discoverability (#92359)
### What?

Improves the `blocking-route` error doc (`errors/blocking-route.mdx`) to
make it easier to connect the "Uncached data was accessed outside of
`<Suspense>`" error to `await params` in a Page component.

### Why?

When a build fails with this error and the only callsite is `const { id
} = await params`, there's no indication that awaiting `params` directly
in a Page triggers it. The fix pattern (pass the `params` Promise to a
Suspense-wrapped child) exists in the doc under "Params and
SearchParams" but developers and AI agents won't find it without
`--debug-prerender` stack traces.

### How?

- Added a "common triggers" list to the "Why This Error Occurred"
section so developers can quickly pattern-match their code
- Added a `--debug-prerender` tip for getting detailed stack traces
- Added a concrete `params` before/after example showing the exact fix
pattern
- Listed all three fix options upfront: `<Suspense>` wrapping,
`loading.js`, or `generateStaticParams`

## PR checklist (Improving Documentation)
- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR
- [x] Follow the docs contribution guide:
https://nextjs.org/docs/community/contribution-guide

Made with [Cursor](https://cursor.com)
2026-04-08 15:13:36 +02:00
Joseph 6cc51a3b8a docs: dynamic routes w/ gsP (#86402) 2025-12-12 14:51:29 +01:00
Andrew Clark 0a3f1e45f4 Rename "blocking route" error docs page (#85189)
The content needs to be updated, too, but for now this just fixes the
link and title so it matches the updated error message in #85087.
2025-10-21 15:43:36 -04:00