Skip to content
InsightLogEditorial Notes
メニュー

この記事はまだ日本語に翻訳されていません。原文(英語)を表示しています。

The real cost of hydration in a server-first blog

Server components remove JavaScript from the bundle, but the client boundary still ships state. Measure the boundary before optimizing the framework.

Daniel Okafor更新 2026年11月20日1分で読めます閲覧 404
X で共有
肯定的 94%

要点 · TL;DR

Server components reduce client JavaScript only when the boundary is drawn carefully. The main costs are the serialized RSC payload, client component props and third-party scripts, not the framework itself.

Key facts

  • A server component that passes a large object into a client component serializes that object into the payload.
  • Hydration cost is paid per client component instance, not per page.
  • Third-party scripts usually dominate the main-thread budget on content sites.

What actually ships

In a server-first app, the browser still downloads:

  1. the framework runtime
  2. client component code
  3. the serialized RSC payload
  4. props passed from server to client components

Only the first two are obvious in bundle reports. The payload and props are where regressions hide.

Draw the boundary around interaction

Start from what must respond on the client:

  • vote buttons
  • reading progress
  • view tracking
  • theme or language menus that need local state

Everything else — article body, table of contents, cards, related posts — can stay on the server. The boundary should follow interaction, not file structure.

The prop serialization trap

Passing a full post object into a client component serializes every field, including content. Pass the minimum: an id, a slug, a formatted count. A smaller prop surface reduces both payload size and re-render risk.

Measure three numbers

MetricWhereWhy
Route JS transferbrowser network panel or build reportShows the real shipped code
RSC payload sizeHTML/stream sizeCatches oversized props
Long tasks during loadperformance traceShows hydration and script cost

Track them per route template, not per page, so the numbers stay comparable.

Common mistakes

  1. Importing a markdown renderer into a client component.
  2. Passing server data through a client wrapper that does nothing.
  3. Loading analytics before the article is readable.
  4. Treating a fast first paint as a fast page.

Conclusion

Server components are a boundary tool, not a performance badge. Keep the client side small, measure the payload and make third-party scripts earn their place.

よくある質問

Do server components eliminate hydration?

No. They remove server-rendered components from the client bundle, but any client component still hydrates with its props.

What should I measure first?

Measure the route's JavaScript transfer size, the RSC payload size and the main-thread work during load. Then decide whether the boundary is in the right place.

この記事は役に立ちましたか?

評価は他の読者に記事の信頼性を示すシグナルになります。

肯定的 94%

Daniel Okafor
Daniel Okafor

Senior data editor · InsightLog

Builds data pipelines and measurement systems, and writes about the context behind every number.

マークダウン原文: /ja/posts/server-components-hydration-cost/raw

引用時の出典: https://insightlog.site/ja/posts/server-components-hydration-cost

Continue reading

あわせて読みたい