๐—ฆ๐—ฆ๐—ฅ, ๐—–๐—ฆ๐—ฅ, ๐—ฆ๐—ฆ๐—š, ๐—œ๐—ฆ๐—ฅ โ€” ๐—›๐—ฒ๐—ฟ๐—ฒ ๐—œ๐˜€ ๐—ช๐—ต๐—ฎ๐˜ ๐— ๐—ฎ๐˜๐˜๐—ฒ๐—ฟ๐˜€

A senior developer once asked me which rendering strategy I would use for a project. I said "SSR" without any confidence. I knew the terms but did not understand the trade-offs.

Every rendering strategy answers one question: when and where does your HTML get built?

๐—ฆ๐—ฆ๐—ฅ (Server-Side Rendering) The server builds HTML fresh for every request.

๐—–๐—ฆ๐—ฅ (Client-Side Rendering) The server sends an empty HTML file. The browser builds the page using JavaScript.

๐—ฆ๐—ฆ๐—š (Static Site Generation) You build every page once at deployment time.

๐—œ๐—ฆ๐—ฅ (Incremental Static Regeneration) This gives you the speed of SSG with the freshness of SSR. It rebuilds individual pages in the background.

๐—›๐—ผ๐˜„ ๐˜๐—ผ ๐—ฐ๐—ต๐—ผ๐—ผ๐˜€๐—ฒ: Ask these four questions:

Stop choosing one strategy for your whole app. Use SSG for marketing, ISR for products, SSR for search, and CSR for dashboards.

Source: https://dev.to/alaa-samy/ssr-csr-ssg-isr-i-was-confused-too-heres-what-actually-matters-305f