Error: Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server".
A Server Component passed a function prop to a Client Component.
Seen on:
React
Meaning
Props crossing the server→client boundary must be serializable. Pass Server Actions (marked "use server") or move the handler into the client component.
Common causes
- Passing onClick or callback props from a server component
- Passing class instances or Dates
⚡ Quick fix
- Define the handler inside the client component
- Use a Server Action with "use server"
- Pass plain data only
Detailed fix by platform
React
- jsx
// actions.ts "use server"; export async function save(formData: FormData) { … }
How to diagnose
- Prop — Which function prop?
- Boundary — Server → client?
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026