Skip to content
masterclass Buddy

Next.js 16+ · Module

next/root-params

next/root-params exports async getters for dynamic route segments before the root layout. Server Components and server-side utilities can use them without passing values through props.

Last updated

Since
Next.js 16.3

Syntax

import { segmentName } from 'next/root-params'
const value = await segmentName()

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • PageProps
  • LayoutProps
  • generateStaticParams
  • use cache
  • unstable_cache
  • Server Components
  • Internationalization

Source: Functions: next/root-params. Checked 2026-11-03.