Next.js to full-stack framework dla React. React sam w sobie to tylko biblioteka UI — renderuje komponenty, ale pozostawia Ci routing, pobieranie danych, renderowanie po stronie serwera i narzędzia do budowania. Next.js zapewnia wszystko to z pudełka plus server runtime.
Co React sam pomija (a Next.js dodaje)
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
