Frontend
    October 21, 2026•6 min read

    Async params in Next.js 16: migrating your dynamic routes

    `params` and `searchParams` are Promises now. Here is what that means for pages, layouts and client components, and how to migrate without touching every file by hand.

    Anonymous
    Async params in Next.js 16: migrating your dynamic routes

    In Next.js 16, the params and searchParams props are Promises. The synchronous fallback that softened the change in version 15 is gone, so code that reads params.slug directly now breaks.

    Server components

    Make the component async and await the props before you use them:

    TYPESCRIPT
    1type Props = { params: Promise<{ slug: string }> }
    2
    3export default async function Page({ params }: Props) {
    4  const { slug } = await params
    5  const post = await getPost(slug)
    6
    7  return <Article post={post} />
    8}

    Client components

    Client components cannot be async. Unwrap the Promise with React’s use() hook instead:

    TYPESCRIPT
    1'use client'
    2
    3import { use } from 'react'
    4
    5export function Slug({ params }: { params: Promise<{ slug: string }> }) {
    6  const { slug } = use(params)
    7
    8  return <span>{slug}</span>
    9}

    Migration checklist

    • Await params in pages, layouts, route handlers and generateMetadata.
    • Update the prop types to Promise<...> so TypeScript points at every call site.
    • Run npx @next/codemod@latest next-async-request-api . to do most of it for you.
    #Next.js
    #React
    #TypeScript
    Share: