All skills
Skillintermediate

server serialization

The React Server/Client boundary serializes all object properties into strings and embeds them in the HTML response and subsequent RSC requests. This serialized data directly impacts page weight and load time, so **size matters a lot**. Only pass fields that the client actually uses.

Claude Code Knowledge Pack7/10/2026

Overview

Minimize Serialization at RSC Boundaries

The React Server/Client boundary serializes all object properties into strings and embeds them in the HTML response and subsequent RSC requests. This serialized data directly impacts page weight and load time, so size matters a lot. Only pass fields that the client actually uses.

Incorrect (serializes all 50 fields):

async function Page() {
  const user = await fetchUser()  // 50 fields
  return 
}

'use client'
function Profile({ user }: { user: User }) {
  return <div>{user.name}</div>  // uses 1 field
}

Correct (serializes only 1 field):

async function Page() {
  const user = await fetchUser()
  return 
}

'use client'
function Profile({ name }: { name: string }) {
  return <div>{name}</div>
}