CodeZettaInterview Hub

Next.js · App Router · Junior · Best Practice

What are route groups and when would you use them?

Short Interview Answer

Folders in parentheses like `(marketing)` organize routes without affecting the URL path.

Detailed Explanation

Use route groups to apply different layouts (marketing vs app shell) or to co-locate related routes without URL segments. They help structure large apps. Avoid overusing them when a real path segment is clearer for SEO and mental models.

Did you know this answer?