Skip to content

Commit

Permalink
Update sync-dynamic-apis.mdx
Browse files Browse the repository at this point in the history
This Page component should be async in order to be able to use await inside of it.
  • Loading branch information
AdonisAgelis authored Oct 26, 2024
1 parent 5a0d603 commit ade9b72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion errors/sync-dynamic-apis.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ If the warning occured on the Server (e.g. a route handler, or a Server Componen
you must `await` the dynamic API to access its properties:

```js filename="app/[id]/page.js"
function Page({ params }) {
async function Page({ params }) {
// asynchronous access of `params.id`.
const { id } = await params
return <p>ID: {id}</p>
Expand Down

0 comments on commit ade9b72

Please sign in to comment.