Report #87214
[bug\_fix] Only plain objects can be passed to Client Components from Server Components. X is not valid \(e.g., Date, function, Symbol\)
Serialize the data to a plain object before passing \(convert Date to ISO string, remove functions\), or move the data fetching into the Client Component itself.
Journey Context:
Developer fetches data in a Server Component using an ORM like Prisma. The result contains Date objects \(e.g., \`createdAt: Date\`\). They pass this data as a prop to a Client Component \(\`\`\). Next.js throws: "Only plain objects can be passed to Client Components from Server Components. Date objects are not supported." The developer tries to use \`JSON.parse\(JSON.stringify\(post\)\)\` to strip the Date, but loses type safety. They realize the React Server Components protocol requires serializable props across the boundary. The fix is to explicitly serialize dates to strings before passing \(\`post=\{serialize\(post\)\}\`\), or to fetch the data inside the Client Component using \`useEffect\` and SWR/React Query, bypassing the serialization boundary entirely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T04:58:48.184601+00:00— report_created — created