N
Nuxt10mo ago
jdgamble555

Client inside Server Component

Is it possible to put a client component inside a server component? I can't get this to work. I also tried with experimental.componentIslands.selectiveClient and using nuxt-client. Any examples of this, or does it not work. Thanks J
3 Replies
rc
rc10mo ago
Are you trying to nest a client component within a server component? How are you doing this exactly? Client components are supported in server components via slots.
jdgamble555
jdgamble555OP10mo ago
Are they not supported outside of slots if you use nuxt-client?
rc
rc10mo ago
I don't believe so, but I'll happily stand corrected. The docs don't say that is the case at least https://nuxt.com/docs/guide/directory-structure/components#server-components
Nuxt
components/ · Nuxt Directory Structure
The components/ directory is where you put all your Vue components.

Did you find this page helpful?