Passing data across the boundary
Props that cross from a Server Component to a Client Component are encoded into
the RSC Payload, so they must be serializable. React's serializer is richer
than JSON — it handles strings, numbers, booleans, null, undefined, arrays,
plain objects, Date, Map, Set, Promise, typed arrays, and JSX elements.
What it cannot carry is a function or a class instance. This fails:
// A Server Component
<Chart format={(n) => n.toFixed(2)} />
React raises: Functions cannot be passed directly to Client Components unless
you explicitly expose it by marking it with 'use server'.
A function marked 'use server' is a Server Function. It crosses the
boundary as a reference, not as code: the client receives a stub that makes a
network request back to the server when called. That is why Server Functions are
the one function shape allowed in props.
Class instances and DOM nodes cannot cross either. When you hit this error, the fix is usually to pass plain data — the primitive or object values the component needs — and let the Client Component build whatever it needs from them.
You are about to answer a short quiz on serializable props.