Next.js Discord

Discord Forum

Is 'use client' passed down to all the child components?

Answered
jaggi73 posted this in #help-forum
Open in Discord
I have a parent component that is marked as 'use client'. This makes the paren component a client component, but does it also make all the children of my parent component client components as well? Or will they remain server components?
Answered by Giant panda
They will be client components as the directive marks the boundary. The exception is if you get server components passed in as props that you render into the client components.
View full answer

3 Replies

Giant panda
They will be client components as the directive marks the boundary. The exception is if you get server components passed in as props that you render into the client components.
Answer