Next.js · Junior · Question 47 of 75
How do you type the props of app/blog/[slug]/page.tsx in Next.js 16?
- ✓Correct answer: With the global helper
PageProps<'/blog/[slug]'> - 2With
NextPage<{ slug: string }>fromnext - 3Typing page props isn't possible
Explanation
Next.js generates route types (during next dev, next build or next typegen), and the PageProps, LayoutProps and RouteContext helpers know the params shape for each path. NextPage is a Pages Router type.