If a Next.js 13 Layout is a clientcomponent, is the page automatically a client component as well?

Title should explain it all, lmk if it doesn’t.
2 Replies
Eirfire
Eirfire7mo ago
no its not, your page can be a server componet even if the layout is a client And from this in any page or react component, can have client and sever components in one
sincere666
sincere6667mo ago
as long as you pass the children like this: <ClientLayout> {children} </ClientLayout> your child component should be fine to be server rendered
Want results from more Discord servers?
Add your server
More Posts
Issue with 'use client' Directive and SSR in Next.js: Conflicting Errors and Resolution"Hello, this code reproduces the error i'm facing `"use client"; import { useState } from "react"; iIncrease Vercel Maximum Duration to 3 minutesHello everyone, I've been really enjoying working with the t3 stack and have developed a project. NDoes anyone know if there's a library for resizing the content of a container element?I'm wondering if there is a library that has component like the card component on this page https://Can't access the session inside a server action```ts export const protectedAction = createSafeActionClient({ async middleware() { const sessiUsage of NextAuth with Prisma and Nextjs AppdirHello! Thats my first project in T3 stack, and first time im using NextAuth, but im not getting ideaAutomatic image/banner gen.Hey, I am making a basic app to expand my knowledge, and I wanted to ask a question here in case somStack for T3 (tRPC, Drizzle, Tailwind, NextAuth) + Bun + turborepoI'm spending this weekend (and possibly part of the week) setting up a starter template with those sDoes anyone know how to delete file from uploadThing after uploading it in Next js?I am trying to use the utApi in next js but its saying only usable in server. What should I do ?Improving accessibility of a Card componentHi there, I'd like to make my ProductCard component more accessible and wanted to have your thoughtsReact query initial data```ts const { data } = useInfiniteQuery({ queryKey: ["releases"], initialPageParam: initi