Next.js Discord

Discord Forum

use client with parent

Unanswered
Serengeti posted this in #help-forum
Open in Discord
SerengetiOP
If I use 'use client' in a components of a page is the whole page loaded client-side or only the component and the rest of page is preloaded server-side?

4 Replies

Giant panda
Only the component is client-side. Additionally even client components are prerendered server-side.
@Giant panda Only the component is client-side. Additionally even client components are prerendered server-side.
SerengetiOP
so the best thing to do if i for example have useState hook is to exclude that part into another small component that renders client side so all the big part is rendered server side?
Giant panda
It is an option, yes.
@Giant panda It is an option, yes.
SerengetiOP
thanks