Page props

PageProps route helper

Generated global helper for App Router pages. Await params. String type does not imply record existence. Source: https://nextjs.org/docs/app/api-reference/config/typescript

Formal Syntax & Structure

nextjs syntaxnextjs
PageProps<'/catalog/[slug]'>

Working Example

Example Snippetnextjs
// app/catalog/[slug]/page.tsxexport default async function Page(props: PageProps<'/catalog/[slug]'>) { const {slug} = await props.params; return <h1>Requested book: {slug}</h1>;}
Next.js Reference