If Layout is Client Component, are all children clients?
Unanswered
Barbary Lion posted this in #help-forum

Barbary LionOP
If I have a dashboard layout that's 'use client' does that mean all children (and everything inside my dashboard that's wrapped by that layout is now client component ?)
6 Replies

@Barbary Lion If I have a dashboard layout that's 'use client' does that mean all children (and everything inside my dashboard that's wrapped by that layout is now client component ?)

Masai Lion
you can not have a layout that use client
Only components imported to that layout become client components

@Masai Lion you can not have a layout that use client

The restriction only applies to the root layout. Other layouts can be client components just fine. Whether it is good practice is another matter

Barbary LionOP
Ah ok thanks