next.js
b350da47 - docs: fix generateImageMetadata example to use normal params object (#85658)

Commit
49 days ago
docs: fix generateImageMetadata example to use normal params object (#85658) ### What? Fixes an inconsistency in the v16 upgrade documentation for `generateImageMetadata`. ### Why? In the “Upgrading to Version 16” guide, the example incorrectly awaited the `params` object inside `generateImageMetadata`, implying that it was a Promise. However, according to the API reference, `params` is a normal object. This PR updates the example to reflect the correct synchronous usage. ### How? Replaced: ```ts export async function generateImageMetadata({ params }) { const { slug } = await params return [{ id: '1' }, { id: '2' }] } With ```ts export async function generateImageMetadata({ params }) { // params is a normal object return [{ id: '1' }, { id: '2' }] } --------- Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
Author
Parents
Loading