Performance: Choosing the right framework for each island
HIGH IMPACT
This affects page load speed and interaction responsiveness by optimizing how much JavaScript is sent and run on the client.
Choose lightweight frameworks like Preact or Solid for small islands and React only for complex ones, loading only needed runtimes.
Use a heavy framework like React for every island regardless of complexity, importing full React runtime for each.
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Heavy framework for all islands | High (many nodes with framework wrappers) | Multiple reflows per island | High paint cost due to large JS | [X] Bad |
| Lightweight framework per island | Minimal DOM overhead | Single reflow per island | Low paint cost with small JS bundles | [OK] Good |