Trong thư mục app/, mỗi thư mục đại diện cho một route segment. page.tsx là component hiển thị cho route đó. [param] là dynamic segment. (group) là route group không ảnh hưởng URL. [...slug] là catch-all.
File conventions: page.tsx, layout.tsx, loading.tsx, error.tsx, not-found.tsx.
Inside the app/ directory, each folder represents a route segment.
- A
page.tsxfile makes that segment publicly accessible.[param]folders create dynamic segments.(group)folders create route groups without affecting the URL.[...slug]creates catch-all routes. - Special file conventions: page.tsx, layout.tsx, loading.tsx, error.tsx, not-found.tsx.