Skip to content

Search

Search notes, blog posts, experiments, learning topics, and resources

All notes

The RSC Serialization Boundary

Apr 2026 · 1 min read

The most common RSC bug I review is not about "use client" placement — it is about props crossing the boundary. Everything passed from a Server Component into a Client Component gets serialized, and serialization silently changes your data:

  • Date objects arrive as strings.
  • Map/Set arrive as plain objects (or explode).
  • Functions only cross if they are Server Actions.

The habit that fixed this for me: treat the boundary like an API contract. Serialize explicitly on the server side (date.toISOString()), and keep the client prop types honest about what they receive. If a prop type says Date but the value crossed the boundary, the type is lying.

Mental shortcut: a Client Component's props are its REST payload. Design them the same way.