# Next.js: Error: Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported

**Code:** `Only plain objects can be passed to Client Components` · **Category:** Next.js · **Seen on:** Next.js, React

A Server Component passed a non-serialisable value (class instance, Date-like object, Mongoose doc, Map) as a prop to a Client Component.

## Meaning

Props must be serialisable. Convert Mongoose/Prisma results to plain objects (`JSON.parse(JSON.stringify(doc))`, `.lean()`, `toObject()`), pass ISO strings instead of Date objects in some cases, and don't pass class instances, functions or Maps. The error shows the offending prop name.

## Common causes

- Mongoose documents passed as props
- Class instances/ORM models
- ObjectId/Decimal values
- Functions as props (separate error)
- `Map`/`Set` or objects with `toJSON` getters

## Quick fix

1. Use `.lean()` for Mongoose queries
2. Map to plain DTO objects before passing
3. Convert dates to strings

## Detailed fix by platform

### Next.js

1. `const posts = await Post.find().lean(); return <PostList posts={JSON.parse(JSON.stringify(posts))} />;`

## How to diagnose

1. **Prop** — Which one?
2. **Type** — Class or ORM document?
3. **Fix** — lean/DTO?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/nextjs/only-plain-objects-client-components)
