2a93345f14
Apparently the object deconstruction in the example doesn't work. This PR proposes a working version: ```diff - export default function Page({ params: { slug: string } }) { - return <div>My Post: {slug}</div> - } + export default function Page({ params }: { params: { slug: string } }) { + return <div>My Post: {params.slug}</div> + } ``` According to the [page reference](https://nextjs.org/docs/app/api-reference/file-conventions/page), the page function parameter slugs needs to be retrieved by calling `params.slug`. The TypeScript section below shows the correct function type signature, although not referencing to the parameter. |
||
---|---|---|
.. | ||
01-getting-started | ||
02-app | ||
03-pages | ||
04-architecture | ||
05-community | ||
.vercel.approvers | ||
index.mdx |