Next.js Discord

Discord Forum

Server Components inside Client components

Answered
Nile Crocodile posted this in #help-forum
Open in Discord
Nile CrocodileOP
From the Next Js 13 documentation, server components can't be imported into client components and if you declare use client and have child components in this component, they are all considered as part of the client js bundle. For some libraries, we use especially for state management, we usually wrap with a Context provider which current we have to mark as a client component, does it mean our enntire app is still shipped to the client as part of the js bundle? If so, we really need to think hard how to share state on server side or something hehe

2 Replies