Performance: Server component execution model
HIGH IMPACT
This affects the initial page load speed and server response time by controlling where components run and how much work is done on the server versus the client.
export default async function Page() { const data = await fetchData(); return <div>{data.title}</div>; }
import React from 'react'; export default function Page() { const [count, setCount] = React.useState(0); return <button onClick={() => setCount(count + 1)}>{count}</button>; }
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Client component heavy | Many nodes created on client | Multiple reflows during hydration | High paint cost due to JS execution | [X] Bad |
| Server component heavy | DOM nodes sent as HTML | Single reflow on initial paint | Low paint cost, minimal JS | [OK] Good |