0
0
Astroframework~8 mins

Why Astro supports multiple frameworks - Performance Evidence

Choose your learning style9 modes available
Performance: Why Astro supports multiple frameworks
MEDIUM IMPACT
This affects page load speed and interaction responsiveness by optimizing how frameworks are loaded and rendered.
Building a website with components from different frontend frameworks
Astro
---
import ReactComponent from './ReactComponent.jsx';
import VueComponent from './VueComponent.vue';
import SvelteComponent from './SvelteComponent.svelte';
---
<div>
  <ReactComponent client:load />
  <VueComponent client:idle />
  <SvelteComponent client:visible />
</div>
Astro loads each framework only when needed using partial hydration, reducing initial bundle size and speeding up interaction readiness.
📈 Performance Gainreduces bundle size by 50%+, improves LCP and INP by deferring unused framework code
Building a website with components from different frontend frameworks
Astro
---
import ReactComponent from './ReactComponent.jsx';
import VueComponent from './VueComponent.vue';
import SvelteComponent from './SvelteComponent.svelte';
---
<div>
  <ReactComponent client:load />
  <VueComponent client:load />
  <SvelteComponent client:load />
</div>
Loading all frameworks fully on the client causes large bundle sizes and slower page loads.
📉 Performance Costadds 300kb+ to bundle, blocks rendering for 200ms+ on slow devices
Performance Comparison
PatternDOM OperationsReflowsPaint CostVerdict
Load all frameworks fully on clientHigh (many nodes from multiple frameworks)Multiple reflows per frameworkHigh paint cost due to large JS[X] Bad
Partial hydration with client directivesLow (only interactive parts hydrated)Single reflow per hydrated componentLower paint cost with smaller JS[OK] Good
Rendering Pipeline
Astro compiles components from different frameworks into static HTML first, then hydrates only the interactive parts on the client as needed.
HTML Generation
JavaScript Loading
Hydration
Interaction
⚠️ BottleneckJavaScript Loading and Hydration
Core Web Vital Affected
LCP, INP
This affects page load speed and interaction responsiveness by optimizing how frameworks are loaded and rendered.
Optimization Tips
1Load only the JavaScript needed for interactive components to reduce bundle size.
2Use partial hydration to improve Largest Contentful Paint by serving static HTML first.
3Defer loading of framework code until user interaction or visibility to improve input responsiveness.
Performance Quiz - 3 Questions
Test your performance knowledge
What is the main performance benefit of Astro supporting multiple frameworks with partial hydration?
AIt reduces the initial JavaScript bundle size by loading only needed framework code.
BIt increases the number of DOM nodes to improve rendering speed.
CIt forces all frameworks to load at once for faster interaction.
DIt disables JavaScript to speed up page load.
DevTools: Performance
How to check: Record page load and interaction in Performance panel; look for long scripting and large JS bundles.
What to look for: Look for reduced scripting time and smaller JS download size indicating better framework loading.