Next.js 15: Why You Now Have to Await params

By Coding Paws ยท

The first time I upgraded a project to Next.js 15, a page that had worked for months started shouting at me:

Error: Route "/journals/[id]" used `params.id`. `params` should be awaited before using its properties.

Nothing in my page had changed. What had changed was Next.js itself. In version 15, params and searchParams are no longer plain objects but Promises. That lets Next.js start rendering before it has finished working out the dynamic parts of the URL, but it means every page that reads them has to wait first.

The fix is small. The page component is already async, so I await params once and pull out what I need:

interface Props {
  params: Promise<{ id: string }>
}

const JournalPage = async ({ params }: Props) => {
  const { id } = await params
  const journal = await prisma.journals.findUnique({ where: { id } })
  // ...
}

My first attempt was (await params).id scattered through the component, which works but gets messy quickly. Destructuring at the top keeps it readable, and it is the same pattern for search parameters:

const { date, topic } = await searchParams

Two things caught me out along the way. The Props type needs updating too, otherwise TypeScript happily lets you treat params as an object. And generateMetadata receives the same Promise, so it needs the same await.

Client components cannot be async, so there the answer is React's use() hook: const { id } = use(params).

It felt like a pointless change at first, but once every page follows the same shape, I barely notice it.

I wrote this article as I'm fairly certain that I will come across this in the future and forget why a parameter doesn't work.