The blank canvas problem React creates, the rendering spectrum from CSR to PPR, and what Next.js actually is under the hood — compiler, router, server, and CDN interface.
F-1 — What Is Next.js and Why Does It Exist?
Who this is for: React developers who have built components, managed state, and maybe shipped a Create React App project — but who have never used Next.js and want to understand not just how to use it but why it was built in the first place. If you already know Next.js well, jump to F-3. This module is the foundation everything else builds on.
The Blank Canvas Problem
React gives you something extraordinary: a mental model for building user interfaces out of composable components. It handles rendering, reconciliation, and state beautifully.
What React deliberately does not give you is everything else.
Install React and start from scratch and you are staring at a blank canvas with a set of paintbrushes but no canvas frame, no easel, no way to hang the finished painting. You need to make decisions — dozens of them — before you can ship a single page to a real user:
- How do users navigate between pages?
- Where does your HTML come from? Does it get generated in the browser, on a server, or at build time?
- How do you split your JavaScript so users don't download one enormous bundle?
- How do you handle environment variables securely?
- How does your app get deployed?
- What happens when someone shares a URL to a specific page and opens it for the first time — will the page render instantly or will they see a blank screen for two seconds while JavaScript boots?
These are not academic questions. Every production React application answers all of them. The question is whether you answer them yourself by assembling a bespoke toolchain, or whether you use a framework that has already made those decisions — well — on your behalf.
Next.js is the answer to that second question.
What Next.js Actually Is
It helps to think of Next.js as four things wearing a single coat:
1. A file-system router. You create files in an app/ directory and Next.js turns them into URL routes automatically. app/blog/[slug]/page.tsx becomes /blog/anything-you-want. No router configuration files, no <Route> components, no path string maintenance.
2. A compiler. Next.js ships with SWC (a Rust-based TypeScript/JavaScript compiler) and Turbopack (a Rust-based bundler built to replace Webpack). You write TypeScript and React — Next.js handles transpilation, minification, tree shaking, and code splitting without you writing a single line of build configuration.
3. A server with multiple rendering modes. Next.js can render your React components on a server, at build time, or in the browser — or any combination of the three within the same application. It decides how to render each page based on rules you control, and it handles the mechanics of sending HTML, streaming it in chunks, and hydrating the result in the browser.
4. A CDN integration layer. Next.js has a deep, first-class integration with the concept of edge networks and content delivery. It knows how to generate cache headers, tell a CDN when content is stale, revalidate pages in the background without taking them offline, and execute code at the network edge close to users rather than in a central data center.
You can use Next.js without Vercel (the company that builds it — more on that shortly). But understanding this CDN integration layer is crucial to understanding why Next.js makes the decisions it makes.
The Rendering Spectrum
The most important concept in all of Next.js is not a hook, an API, or a configuration option. It is a mental model: the rendering spectrum.
Every web page you have ever visited sits somewhere on this spectrum. Understanding where different types of content belong — and what the trade-offs are at each point — is the skill that separates developers who use Next.js from developers who truly understand it.
Point 1: Client-Side Rendering (CSR)
The original React model. Your server sends a nearly empty HTML file with a <script> tag. The browser downloads JavaScript, executes it, your React application boots, it fetches data from an API, and eventually renders something meaningful.
Browser request → Empty HTML → JS downloads → JS executes → API call → Render
Where this works well: Highly interactive applications where the user is always logged in, where SEO doesn't matter (internal dashboards, admin panels, tools behind authentication), and where the content is always different per user so pre-rendering provides no benefit.
Where this breaks: Any page where someone might arrive via a search engine, share a link, or encounter it for the first time. The page is invisible to web crawlers unless they execute JavaScript (many don't). Users on slow connections see nothing for 2–4 seconds. Your Largest Contentful Paint score — the core metric Google uses for search ranking — is catastrophic.
Point 2: Server-Side Rendering (SSR)
When a user requests a page, your server runs the React components, fetches the data they need, generates complete HTML, and sends it. The browser receives a fully rendered page immediately.
Browser request → Server fetches data → Server renders HTML → Full page arrives
Where this works well: Content that changes frequently and is different for each user — an authenticated feed, a personalised homepage, real-time inventory counts.
Where this breaks: It doesn't scale gracefully under load. Every page view requires your server to do work. If ten thousand people hit your homepage simultaneously, your server is rendering that page ten thousand times even if the content is identical for all of them.
Point 3: Static Site Generation (SSG)
Sign in to keep reading
The rest of this module is free — sign in with Google to unlock it and track your progress.
Sign in & RegisterDiscussion
0Join the discussion