A Server Component and the Client Components it renders run in different environments, so every prop crossing the boundary is encoded into the RSC payload and rebuilt on the client. React's documented list of serializable props:
- Primitives: string, number, bigint, boolean,
undefined,null, and symbols only if registered withSymbol.for. - Iterables of serializable values: String, Array,
Map,Set, TypedArray andArrayBuffer. Date.- Plain objects created with object initializers, with serializable properties.
- Server Functions (
'use server'). - Elements (JSX), of Client or Server Components.
- Promises.
Not supported: functions that aren't exported from a client-marked module or marked 'use server'; classes; instances of any class other than those built-ins, and objects with a null prototype; symbols not registered globally.
Richer than JSON. The payload is JSON text with $-prefixed tags: "$D…" is a Date, "$n10" a bigint, "$undefined", "$W2" a Set whose entries are in row 2. -0, NaN and Infinity survive, and an object referenced twice, even cyclically, arrives as one object.
Promises stream. React doesn't wait for a promise prop. It writes a placeholder ("$@3"), keeps the stream open, and emits row 3 when the promise settles. The client gets a Promise to read with use inside <Suspense>; a rejection arrives as an error row, with the message hidden in production.
Functions don't cross, because a closure can't be sent. Pass a Server Function, which is sent as a reference the client can call, or move the handler into the Client Component. A Client Component itself can be passed, as a reference.
Server Function return values follow the same rules. Their arguments have a slightly different list.