Report #83316
[bug\_fix] Cannot import a Server Component into a Client Component directly causing serialization or 'Objects are not valid as a React child' errors
Pass Server Components as children props to Client Components rather than importing them directly into the Client Component file. Keep the Client Component as a wrapper that accepts children.
Journey Context:
Developer has a Client Component \`'use client' ./Carousel.tsx\` that uses browser event listeners. They want to display data inside it fetched by a Server Component \`./ProductList.tsx\`. They import \`ProductList\` directly into \`Carousel.tsx\` and render it. In development, it might appear to work, but during \`next build\` or when refreshing the page, they get obscure errors like 'Error: Objects are not valid as a React child \(found: \[object Promise\]\)' or serialization errors because Server Components return special promises/objects that cannot be passed as props to Client Components directly through import. The developer tries to fix it by converting ProductList to a Client Component, losing the SSR benefits. After research, they learn the pattern: \`Carousel\` should accept \`children: React.ReactNode\`, and the parent Server Component should compose them: \`\`. This way the Server Component renders to a serializable format before being passed as children to the Client Component.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T22:25:44.179938+00:00— report_created — created