---
title: "params and searchParams are now Promises: fixing \"params should be awaited\" in Next.js"
description: "Since Next.js 15, params and searchParams are Promises, and Next.js 16 removed synchronous access. Learn how to await them in pages, layouts, routes and Client Components."
url: https://www.danny.engineering/answer/nextjs/params-and-searchparams-are-now-promises-fixing-params-should-be-awaited-in-nextjs
author: Danny
published: 2026-11-27T00:00:00.000Z
updated: 2026-11-27T17:23:00.000Z
tags: ["Next.js"]
---

# params and searchParams are now Promises: fixing "params should be awaited" in Next.js

## The short answer


In the App Router, `params` and `searchParams` are Promises. Make your page or layout `async` and `await` them before reading a property. In a Client Component, unwrap them with React's `use`, or read the URL with `useParams` and `useSearchParams`.


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


## Why it happens


Next.js 15 changed `params`, `searchParams`, `cookies()`, `headers()` and `draftMode()` to be asynchronous. Making them Promises lets Next.js prepare as much of a page as possible before the request-specific values are known, which is the basis of streaming and partial prerendering.


To ease the change, Next.js 15 kept a temporary synchronous fallback and logged a warning in development when you read a property directly:


```bash
Route "/blog/[slug]" used `params.slug`. `params` should be awaited before using its properties.
```


Next.js 16 removed that fallback, so synchronous access no longer works at all. Reading `params.slug` gives you a property of a Promise, which is `undefined`, and TypeScript reports an error if your types are correct.


This applies to `params` in `page`, `layout`, `route`, `default` and the metadata image files such as `opengraph-image` and `icon`, and to `searchParams` in `page`.


## How to fix it


### Await them in Server Components


```typescript
// app/blog/[slug]/page.tsx
export default async function Page({
  params,
  searchParams,
}: {
  params: Promise<{ slug: string }>;
  searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
}) {
  const { slug } = await params;
  const { tab } = await searchParams;

  return <Post slug={slug} tab={typeof tab === 'string' ? tab : 'overview'} />;
}
```


Do the same in `generateMetadata`, and in Route Handlers, where `params` comes from the second argument:


```typescript
// app/api/posts/[id]/route.ts
export async function GET(
  request: Request,
  { params }: { params: Promise<{ id: string }> }
) {
  const { id } = await params;
  return Response.json(await getPost(id));
}
```


### Use the generated type helpers


Run `npx next typegen` to get globally available `PageProps`, `LayoutProps` and `RouteContext` types. They are typed from your actual route, so the param names are checked for you:


```typescript
export default async function Page(props: PageProps<'/blog/[slug]'>) {
  const { slug } = await props.params;
  return <h1>{slug}</h1>;
}
```


### Unwrap them in Client Components


Client Components cannot be `async`. If a page file is a Client Component, unwrap the Promise with `use`:


```typescript
'use client';

import { use } from 'react';

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


For components deeper in the tree, `useParams` and `useSearchParams` from `next/navigation` read the current URL without any prop passing.


### Run the codemod


The async request APIs codemod converts most call sites for you, and adds a comment where it cannot:


```bash
npx @next/codemod@canary next-async-request-api .
```


Search for `@next-codemod-error` comments and `UnsafeUnwrapped` casts afterwards and fix each one by hand.


## Common pitfalls

- Updating the code but not the types. If you still type `params` as a plain object, TypeScript will not warn you about missing `await` calls.
- Awaiting only in the page and passing the raw Promise to a child that reads it synchronously.
- Forgetting `generateMetadata` and `generateStaticParams`. `generateMetadata` receives Promise `params`; `generateStaticParams` returns plain objects and does not change.
- Treating `searchParams` values as strings. Each value can be a string, an array of strings or `undefined`.
- Making a Client Component `async` to use `await`. Use `use` instead.

## Related reading

- [Next.js: upgrading to version 16](https://nextjs.org/docs/app/guides/upgrading/version-16)
- [Next.js: page.js file convention](https://nextjs.org/docs/app/api-reference/file-conventions/page)
- [Next.js: codemods](https://nextjs.org/docs/app/guides/upgrading/codemods)
