next.js
1e6423ea - docs: generateMetadata values should be serializable with use cache (#97551)

Commit
23 days ago
docs: generateMetadata values should be serializable with use cache (#97551) ### Why? generateMetadata can be marked with use cache, but Cache Function return values must be serializable. The metadataBase examples use URL objects, so the interaction needs co-located guidance for cached metadata. ### How? Add a Good to know note that recommends returning metadataBase as a string, such as with url.toString(), and links to the use cache serialization requirements. Runtime behavior is unchanged. <!-- NEXT_JS_LLM --> --------- Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
Author
Parents
Loading