Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions docs/01-app/02-guides/upgrading/version-16.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,11 @@ export default function Image({ params, id }) {
}
```

Starting with **Next.js 16**, to align with the [Async Request APIs](#async-request-apis-breaking-change) change, these are also asynchronous.
Starting with **Next.js 16**, to align with the [Async Request APIs](#async-request-apis-breaking-change) change, the image generating function now receives `params` and `id` as promises. The `generateImageMetadata` function continues to receive synchronous `params`.

```js filename="app/shop/[slug]/opengraph-image.js"
// Next.js 16 - asynchronous params access
export async function generateImageMetadata({ params }) {
const { slug } = await params
const { slug } = params
return [{ id: '1' }, { id: '2' }]
}

Expand Down
Loading