Part III — The Speed · Lesson 5.6
Rendering Patterns
In one lineWhere and when HTML gets built — CSR, SSR, SSG, ISR, streaming — decides your LCP before you write a line.
Where you've seen itAn e-commerce product page: static description, live price, and reviews that appear a moment later. Three patterns, one screen.
Diagram
How it works
- SSG/ISR for anything cacheable — the CDN answers in ~30ms and no server runs per view.
- SSR when the HTML must differ per user and SEO or LCP matters.
- Stream so the shell paints immediately while slow data (reviews, recommendations) arrives in later chunks.
- CSR is perfectly correct behind a login where SEO is irrelevant and the app is long-lived.
- Mix per route, and per component. The interview answer is almost never one pattern for a whole app.
Trade-offs
| Pattern | LCP | Freshness | Server cost |
|---|---|---|---|
| CSR | worst | live | none |
| SSR | good | live | per request |
| SSG | best | build-time | none |
| ISR | best | near-live | occasional |
| Streaming | best useful | live | per request |
| Islands | best | depends | low |
Interview angle
"SSR or CSR for an e-commerce site?"
- Per route: product and category pages need SEO and fast LCP → SSG/ISR at the edge; cart and account are CSR behind login.
- Price and stock are the genuinely dynamic bits — fetch those client-side or stream them into a static shell.
- Name hydration cost explicitly: SSR that ships a huge bundle can feel slower than CSR despite a better LCP.
Recap
- The pattern is chosen per route, by freshness and personalisation.
- Hydration is the hidden cost — looking ready isn't being ready.
- Static shell + streamed dynamic parts is the default answer for most content sites.