Adding "use client" to page.js makes "Event handlers cannot be passed to Client Component props" go away. It also moves your data fetching into the browser. Here is what I do instead.

The error has relatives, and they all trace back to one rule.

The rule

Components in the app directory are Server Components unless the file has "use client" or is imported by a file that does. A Server Component renders on the server and sends its output to the browser as a serialized stream. Props for a Client Component travel in that stream.

So props have to be data: strings, numbers, booleans, arrays, plain objects, and a few extras like Date. Functions are out. So are class instances with methods.

Case 1: a handler on a plain element

// app/products/page.js (Server Component) export default async function Page() { const products = await getProducts(); return products.map((p) => ( <button key={p.id} onClick={() => addToCart(p.id)}> Add to cart </button> )); } 

The server has no DOM, so onClick can't run there. Move the handler into a small client component:

// components/AddToCartButton.js "use client"; export default function AddToCartButton({ productId }) { return <button onClick={() => addToCart(productId)}>Add to cart</button>; } 

The page renders <AddToCartButton productId={p.id} />. Pass the id, not the function.

Putting "use client" on page.js also silences the error, but the page then runs in the browser. Data fetching either moves into an effect (spinners, request waterfalls) or breaks, and the whole page ships as JavaScript. Keep the directive on the smallest leaf that needs it.

Case 2: a function passed as a prop

The message changes: "Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with 'use server'." You get it from <Modal onClose={() => router.back()} /> in a server page, or from a table with a formatter.

Table libraries cause this most often. Column definitions with a cell: ({ row }) => ... renderer are full of functions. Define the columns in a "use client" file, import that into the page, and send only the row data across.

If the function really should run on the server, mark it with "use server" and you can pass it. A Server Action is a public POST endpoint, whether or not your UI is the only caller. Check the session and validate the input inside the action, every time, as you would in an Express route. Treat it like a private helper and you end up with a delete action anyone can call.

One thing does cross the boundary: children. A Server Component can be passed as children to a Client Component. Render props, where children is a function, can't.

Case 3: Mongoose documents

// app/posts/page.js const posts = await Post.find({ published: true }); return <PostList posts={posts} />; 

You get "Only plain objects can be passed to Client Components from Server Components." A Mongoose document is a class instance with getters and methods like save().

.lean() returns ordinary objects, but _id is still an ObjectId with a toJSON method, so the next message complains about that. lean() also only fixes the top level. Each subdocument in an array carries its own ObjectId _id, and Buffer and Decimal128 fields break the same way.

The popular fix is JSON.parse(JSON.stringify(posts)). I don't use it. It copies the entire result and silently turns Dates and ObjectIds into strings. In TypeScript the output is any, so your types say createdAt is a Date while the runtime value is a string. That returns later as a .getTime is not a function crash in a component nobody connects to this line.

Map to the shape the client needs:

const posts = await Post.find({ published: true }).lean(); const data = posts.map((p) => ({ id: p._id.toString(), title: p.title, createdAt: p.createdAt.toISOString(), })); 

There's a second reason to do it by hand. Props passed to a Client Component are serialized into the HTML the browser receives. View source, search for a field name, and you'll find it. Pass a whole user document and the password hash and reset token are in the page.

I keep one mapper per model (a toPostDTO function) and call it from every page and route handler that needs that model.

Finding the bad prop

In development, Next prints the element with the offending prop inline, so read the whole error before you search for it. When you can't tell which value is the problem, test your suspects:

const isPlain = (v) => { const proto = Object.getPrototypeOf(v); return proto === Object.prototype || proto === null; }; 

Anything that returns false and isn't an array or a primitive is your answer.

Takeaway

Search your app directory for page.js and layout.js files that start with "use client". Each is either justified or a shortcut taken to quiet this error. In my experience it's usually the shortcut, and moving the boundary down to a button or a table is a smaller change than it looks.

Production adds its own twist. The error message is stripped down to a digest, and a page that passes on your seed data can still fail on live data because of nested fields. I cover where to find the real error text and how to spot that gap in the full write-up: Next.js Client Component props errors, causes and fixes.