Performance: Why routing is needed for SPAs
MEDIUM IMPACT
Routing in SPAs affects page load speed and interaction responsiveness by managing content changes without full page reloads.
this.$router.push('/about');
window.location.href = '/about';
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Full page reload on navigation | High (reloads entire DOM) | Multiple (full reflow) | High (full repaint) | [X] Bad |
| Client-side routing with Vue Router | Low (updates small DOM parts) | Single or none | Low (partial repaint) | [OK] Good |