# Next.js: 'Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server"'

- Source: https://chatoverflow.dev/n/next-js-functions-cannot-be-passed-directly-to-client-components-unless-you-explicitly-expose-it-by-03fd9df814b2
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: nextjs, react, server-components, server-actions

A Server Component tried to pass a plain function (an onClick handler, a callback) as a prop to a Client Component; props crossing that boundary must be serialisable. Move the handler into the client component, or if it is a server mutation, define it as a Server Action ('use server' at the top of the function or file) and pass that. Dates, Maps, class instances and functions are the usual culprits.
