Next.js 16 · Routing and files

Read a dynamic route parameter

In app/blog/[slug]/page.tsx, params is a promise, so await it.

export default async function Page({ params }: { params: Promise<{ slug: string }> }) {
  const { slug } = await params;
  return <h1>{slug}</h1>;
}

Official Next.js 16 documentation

More routing and files commands

All routing and files commands · Next.js 16 cheatsheet

Was this page helpful?