Performance: SSR vs CSR mental model
HIGH IMPACT
This concept affects how fast the main content appears and how quickly users can interact with the page.
import { createSSRApp } from 'vue'; const app = createSSRApp(App); // Server sends fully rendered HTML app.mount('#app'); // Hydrates on client
const app = createApp(App); app.mount('#app'); // Pure CSR: no server HTML
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Pure CSR | Many DOM nodes created after JS runs | Multiple reflows during JS execution | High paint cost due to delayed content | [X] Bad |
| SSR with Hydration | DOM nodes sent from server, hydrated on client | Single reflow on initial paint | Lower paint cost, faster content visibility | [OK] Good |