Next.js Discord

Discord Forum

is this standard procedure? wrapping client component inside a server component

Unanswered
Swedish Lapphund posted this in #help-forum
Open in Discord
Swedish LapphundOP
I have a page that needs to be a client component due to using state etc and effects etc. The page contains some profile info about the currently signed in user. I want this info to be fetched from the API without creating loading UI on the client component. So my idea is to wrap the entire client component/page in a server component. The server component then makes the requests and hand over the user info to the client component as props. Is this a common procedure? Or should I use layout? And make the request inside a layout

1 Reply

Plott Hound