Next.js · Middle · Question 43 of 75
How does a static route differ from a dynamic one in terms of rendering?
- ✓Correct answer: Static - at build time, dynamic - on every request
- 2A static route can't contain any JavaScript
- 3Dynamic means any route with a
[param]segment in its path
Explanation
A route becomes dynamic when it uses request data: cookies(), headers(), searchParams, uncached requests. A [slug] segment by itself doesn't do that - it can be prerendered via generateStaticParams. With Cache Components, the boundary runs inside the page (PPR).