Next.js Discord

Discord Forum

What's the best way to check if a rendered page is actually a Server Component and not a Client?

Unanswered
African Slender-snouted Crocodil… posted this in #help-forum
Open in Discord
Original message was deleted.

2 Replies

try to use a function that is only available on client side. If the server throws an error, you know, that it's a server component. Else it's clientside rendered
Giant panda
I ask this because if you import a Component that's a client component, it turns the whole page (or everything under the component) to a client component
That's wrong.