Next.js Discord

Discord Forum

Error: Event handlers cannot be passed to Client Component props.

Answered
Indian mackerel posted this in #help-forum
Open in Discord
Indian mackerelOP
i have this inside a server component but i get
Error: Event handlers cannot be passed to Client Component props.
even putting only the input in a client component on another file results in the same error.

Can i somehow avoid to have the entire component as a client component?
Answered by Indian mackerel
Solution:
It was right creating another client component, the issue was that i had another onClick, nice for nextjs to not tell me where the error was
View full answer

1 Reply

Indian mackerelOP
Solution:
It was right creating another client component, the issue was that i had another onClick, nice for nextjs to not tell me where the error was
Answer