Next.js Discord

Discord Forum

Header and footer from layout.tsx don't get rendered

Answered
Schneider’s Smooth-fronted Caima… posted this in #help-forum
Open in Discord
Original message was deleted.
Answered by Asian black bear
It looks like you have the layout in the app directory but are hoping that it will effect stuff in the pages directory. This does not work, they are totally separate.
View full answer

3 Replies

Asian black bear
It looks like you have the layout in the app directory but are hoping that it will effect stuff in the pages directory. This does not work, they are totally separate.
Answer
Original message was deleted
is this in app dir or at pages dir?
it's precisely as minabot says; app dir and pages dir run independently and the root layout in the app router doesn't wrap the pages dir react tree