C.W.K.
Stream
Lesson 02 of 08 · published

What Next.js Provides

~22 min · conventions, Turbopack, App Router, RSC

Level 0Curious
0 XP0/68 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

The convention list, in one place

Every problem React leaves open, Next.js answers with a convention. Memorize the table once and you stop rediscovering it later:

ProblemConvention
RoutingFile-system: a folder with page.tsx = a route
Layoutslayout.tsx per segment, persists across navigation
Loading stateloading.tsx, wired into Suspense automatically
Errorserror.tsx per segment, global-error.tsx at root
API endpointsroute.ts handlers (GET/POST/…)
Server dataasync Server Components, fetch directly
MutationsServer Actions ('use server')
BundlingTurbopack (Rust) — default since v16
Images / fonts / scriptsnext/image, next/font, next/script
Production servernext start — Node anywhere, or self-host edge

The shape of a starter

The CLI sets the defaults you'll inherit for everything else: TypeScript on, ESLint on, App Router on, Turbopack on, Tailwind optional, src/ optional, import alias @/*.

Why it's worth learning the table

Most Next.js confusion comes from skipping the convention list and reaching for a third-party package that already exists in the box. Look at the table first; if it's there, prefer the built-in.

Code

Bootstrap a current Next.js project·bash
npx create-next-app@latest cwk-app
cd cwk-app
# Pick: TypeScript yes, ESLint yes, Tailwind yes (or no), App Router yes,
# Turbopack yes, src/ no, import alias '@/*'.
npm run dev
# Dev server on http://localhost:3000 with Turbopack HMR
Inspect the install·bash
tree -L 2 -I node_modules
# .
# ├── app/
# │   ├── layout.tsx
# │   ├── page.tsx
# │   └── globals.css
# ├── public/
# ├── next.config.ts
# ├── package.json
# └── tsconfig.json

External links

Exercise

Run npx create-next-app@latest and produce a one-page summary: what files were created, which file is the entry route, and which file is the root layout. Note which prompts you accepted defaults for and why.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.