pass server component as props to client component?
Answered
Cuban Crocodile posted this in #help-forum
Cuban CrocodileOP
let's say i import server component on ./app/page.tsx and pass it on client component as a prop. does that mean that client component recieve as a prop already rendered server component? or client component recieve reference to server component and it will be rendered on client side still?
Answered by Rafael Almeida
the client component receives the server component already rendered by the server, so you can wrap certain parts of the page with client components (like context providers) and avoid the rest of the tree also becoming client components
6 Replies
the client component receives the server component already rendered by the server, so you can wrap certain parts of the page with client components (like context providers) and avoid the rest of the tree also becoming client components
Answer
soo, this is right way to render ResultFallback on server side?
before ResultFallback will imported inside client component, now i recieve ResultFallback as a prop from server component
yeah this will render the fallback on the server
Cuban CrocodileOP
ok, thanks!