Skip to main content
PProfileMatch
← Path

Next.js · Next.js App Router and File-Based Routing Explained

0 XP
  1. 1 current stop: learning
  2. 2 upcoming
  3. 3 upcoming
  4. 4 upcoming
  5. 5 upcoming

Finish after stop 5

Stop 1 of 5 · Bike shop: reading the street map

Trick to keep in mind+3 XP

A folder is a street; only a page.tsx opens it to visitors. Parentheses are invisible.

In the App Router the folder names build the URL, but a folder only becomes a reachable route once it holds a page file. Wrapping a folder name in parentheses makes a route group: a way to organise files that adds nothing to the URL. So a page inside (shop)/cart is served at /cart, and a page directly in (shop) is served at /.

Read it once, then a question tests whether the trick stuck.