Skip to content
InsightLogEditorial Notes
Menú

Este artículo aún no se ha traducido al español. Se muestra el texto original en inglés.

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 OkaforActualizado 20 de noviembre de 20261 min de lectura404 visitas
Compartir en X
94% positivo

Resumen clave · 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.

Datos clave

  • 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.

Preguntas frecuentes

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.

¿Te resultó útil este artículo?

Tu valoración indica a otros lectores la fiabilidad del artículo.

94% positivo

Daniel Okafor
Daniel Okafor

Senior data editor · InsightLog

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

Fuente markdown: /es/posts/server-components-hydration-cost/raw

Cita este artículo: https://insightlog.site/es/posts/server-components-hydration-cost

Continue reading

Sigue leyendo