Performance: Use client directive
MEDIUM IMPACT
This affects how components are rendered and hydrated on the client, impacting initial load speed and interactivity.
export default function StaticComponent() { return <div>Hello, static content!</div>; }
"use client"; export default function StaticComponent() { return <div>Hello, static content!</div>; }
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Server component (no "use client") | Minimal, static HTML | 0 | Low | [OK] Good |
| Client component with "use client" | Hydrated with JS event handlers | 1-2 | Medium | [!] OK |
| Unnecessary "use client" on static component | Hydrated unnecessarily | 1-3 | High | [X] Bad |