Next.jsはフルスタック React フレームワークです。React自体は単なるUIライブラリです。コンポーネントをレンダリングしますが、ルーティング、データ取得、サーバーレンダリング、ビルドツールはあなたに任されます。Next.jsはそのすべてをすぐに提供し、さらにサーバーランタイムも備えています。
なぜ重要なのか
text
React (library) → Next.js (framework) adds:
──────────────────────────────────────────────────
UI rendering only → File-based routing (folders = routes)
Client-side rendering → Server rendering (SSR), static generation (SSG), ISR
You wire data fetching → Built-in data fetching + caching
No backend → API routes / Route Handlers (full-stack)
Manual bundling → Zero-config build, code splitting, optimization
Manual <img> → next/image (auto-optimized images), next/font
具体例:ルートは単なるファイル
tsx
() {
;
}
