next.js
fcadb684 - docs: update Page example to use Promise-based params in 05-server-and-client-components.mdx (#81557)

Commit
216 days ago
docs: update Page example to use Promise-based params in 05-server-and-client-components.mdx (#81557) What? This PR updates the Page component example in 05-server-and-client-components.mdx to use Promise-based params as recommended in the Next.js 15 documentation. Why? Next.js 15 introduced support for async props, allowing the params prop to be a Promise in Server Components. Updating the documentation ensures that users follow the latest recommended practices and avoid confusion when working with dynamic routes in Next.js 15. How? - Changed the Page component example to accept params as a Promise and use await params to destructure the id. - Updated the type annotation accordingly.
Author
Parents
Loading