1---
2title: Minimize Serialization at RSC Boundaries
3impact: HIGH
4impactDescription: reduces data transfer size
5tags: server, rsc, serialization, props
6---
7
8## Minimize Serialization at RSC Boundaries
9
10The 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.
11
12**Incorrect (serializes all 50 fields):**
13
14```tsx
15async function Page() {
16 const user = await fetchUser() // 50 fields
17 return <Profile user={user} />
18}
19
20'use client'
21function Profile({ user }: { user: User }) {
22 return <div>{user.name}</div> // uses 1 field
23}
24```
25
26**Correct (serializes only 1 field):**
27
28```tsx
29async function Page() {
30 const user = await fetchUser()
31 return <Profile name={user.name} />
32}
33
34'use client'
35function Profile({ name }: { name: string }) {
36 return <div>{name}</div>
37}
38```