mm2
mm2
TTCTheo's Typesafe Cult
Created by mm2 on 3/20/2025 in #questions
What's the best Nextjs architecture?
I have a Nextjs app where the current architecture is: - app -- [locale] --- /home ---- page.tsx ---- loading.tsx - clientLayout.tsx - layout.tsx - loading.tsx The layout.tsx is something like this: <ClientLayout> {children} </Clientlayout> Where the ClientLayout is a client side and the page is server side (using dynamic routes). So it’s a layout (server side) with a clienteLayout (client side) wrapping a page (server side). Does make sense to split the clientLayout in two sub-components like `<TopClientLayout /> {children} < BottomClientLayout /> So the children (pages) wouldn't be wrapped by a client Component ?
5 replies