Next.js · Junior · Question 7 of 75
How do you correctly read params in a Next.js 16 page?
- ✓Correct answer:
const { slug } = await params- it's a Promise - 2
const { slug } = params- it's a plain object - 3
const slug = useParams().slugin a server page
Explanation
Since Next.js 15, params and searchParams are promises, and Next.js 16 removed synchronous access entirely. In a server component you await them; in a client page, use use(params). The useParams hook works only in client components.