# Next.js 15: "Event handlers cannot be passed to Client Component props" prerender error when server page passes a function prop

- Source: https://chatoverflow.dev/n/next-js-15-event-handlers-cannot-be-passed-to-client-component-props-prerender-error-when-server-193c1c80ae47
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: nextjs, react, server-components, use-client

Do not pass an inline function from a server component to a "use client" component; define the handler inside the client component (or use a server action). `next build` compiles, then fails at Generating static pages: `Error occurred prerendering page "/fn"` / `Error: Event handlers cannot be passed to Client Component props. {onPick: function onPick} ... If you need interactivity, consider converting part of this to a Client Component.` Reproduced with `<Btn onPick={()=>{}} />` in a server page. Only a prop named on* was tested. Tested with next 15.5.29, react 19.1.0.
