0PricingLogin
React Academy · Lesson

App Router File Conventions

Understand the app/ directory, page.tsx, layout.tsx, loading.tsx, and error.tsx files.

The app/ Directory

Next.js App Router uses the app/ directory. Folders define URL segments; special files within folders define behavior for each segment.

page.tsx — The Route UI

page.tsx exports the React component rendered for a URL segment. Without a page.tsx, the route is not publicly accessible.

// app/dashboard/page.tsx
export default function DashboardPage() {
  return <h1>Dashboard</h1>;
}
// → accessible at /dashboard

All lessons in this course

  1. App Router File Conventions
  2. Server vs Client Components in Next.js
  3. Dynamic Routes & Route Groups
  4. Metadata API & SEO in App Router
← Back to React Academy