next.js
2ae7f7ea - docs: clarify placeholder params for empty data sources (#102149)

Commit
22 hours ago
docs: clarify placeholder params for empty data sources (#102149) ### What? Clarify how to build a Cache Components route when its CMS, database, or API has no entries for `generateStaticParams` at build time. ### Why? The error guide already showed a placeholder but said it should be avoided, leaving the recovery path for a legitimately empty data source unclear. ### How? Recommend returning real parameters when available and a placeholder handled by `notFound()` when the list is empty. Show the conditional example and explain that rendering real content remains unvalidated in an empty-data build. ### Verification - Prettier and ESLint passed for the updated MDX file. - Runtime builds and tests were not run because this change only updates documentation. <!-- NEXT_JS_LLM -->
Author
Parents
Loading