Next.js · Junior · Question 1 of 75
What is colocation in the App Router?
- ✓Correct answer: Keeping components and utilities next to routes inside
app/ - 2Placing the server and the database in the same data center
- 3Combining several pages into one JS bundle
Explanation
Files in app/ become public only through page or route. So it's safe to keep a route's components, hooks, styles and tests next to its page.tsx. For clarity, use private _components folders or keep shared code in src/ outside app.