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.
SubscribeRelated
PagePropsLayoutPropsgenerateStaticParamsuse cacheunstable_cacheServer ComponentsInternationalization