rsnext/docs
Chad Luo 2a93345f14
[Docs] fix example function param and signature (#51235)
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.
2023-06-13 13:33:31 +00:00
..
01-getting-started docs: Adds Note to Good to know consistency (#51080) 2023-06-12 19:00:07 -07:00
02-app [Docs] fix example function param and signature (#51235) 2023-06-13 13:33:31 +00:00
03-pages docs: Adds Note to Good to know consistency (#51080) 2023-06-12 19:00:07 -07:00
04-architecture docs: Adds Note to Good to know consistency (#51080) 2023-06-12 19:00:07 -07:00
05-community docs: Adds Note to Good to know consistency (#51080) 2023-06-12 19:00:07 -07:00
.vercel.approvers Update codeowners to use Vercel Spaces (#50841) 2023-06-08 12:02:18 +02:00
index.mdx Adds missing and in How to Use These Docs section (#51058) 2023-06-10 13:15:02 +00:00