Next.js Discord

Discord Forum

server comps in a layout not displaying in a client side page.tsx?

Unanswered
Asiatic Lion posted this in #help-forum
Open in Discord
Asiatic LionOP
i have a server component that fetches data and builds my main nav for my site. that server component is imported and to my root layout.tsx. for pages that themselves are server components, the nav displays fine. but i have a few newer page.tsx components that are client comps and when i build the app and start it (next build & next start, next dev works fine) the main nav doesn’t render. it renders in the other server pages but not in pages marked with “use client”;

is there something that prevents server comps in a layout from rendering when the page is a client comp?

0 Replies