Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CButton SSR error (CoreUI PRO for Next) #408

Open
kemalatila opened this issue Sep 13, 2024 · 1 comment
Open

CButton SSR error (CoreUI PRO for Next) #408

kemalatila opened this issue Sep 13, 2024 · 1 comment

Comments

@kemalatila
Copy link

I use CoreUI PRO for Next with ready template but I get errors when I try to use SSR. I've noticed so far CFormInput and CButton give errors.

For Instance:

Save

"Error: Event handlers cannot be passed to Client Component props.
<button className=... onClick={function onClick} disabled=... type=... children=...>
^^^^^^^^^^^^^^^^^^
If you need interactivity, consider converting part of this to a Client Component." error message is that.

@majsterkoo
Copy link

majsterkoo commented Sep 14, 2024

You need to use "use client" directive at the top of the files including these components.
Because they contain client side events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants