Next.js Discord

Discord Forum

Quetion on route group Nextjs

Answered
Ragdoll posted this in #help-forum
Open in Discord
RagdollOP
I added to 2 groups and added 2 layouts to each group to test out how layouts uniqely works for each group. Here is the code https://gitlab.com/aruprakshit/next-app-router/-/tree/main/app/posts?ref_type=heads

Show page layout not applying its background. Not sure where is it wrong
Answered by Ragdoll
I fixed it. folder was not inside the group.. so it was the reason
View full answer

21 Replies

RagdollOP
I fixed it. folder was not inside the group.. so it was the reason
Answer
RagdollOP
in my VSCODE it was not visible clearly like it is in the gitlab
RagdollOP
@Ray I have one question
sure
RagdollOP
https://nextjs.org/docs/app/building-your-application/configuring/src-directory says

>> src/app or src/pages will be ignored if app or pages are present in the root directory.

Does it mean if I have src/pages then app from root folder willl be ignored or only /pages will be ignored?
RagdollOP
ok means if I have app in the root, and also in src/ folder along with pages, then app from src folder will be ignored, but not pages right?
well I have never tried it lol
either use src or not to use
RagdollOP
hm. I am kind confused with the doc line as I see in our project app presents in root and pages inside the src
just create a page inside src/pages
and see if it works
RagdollOP
it works
but I guess it does not
lol
RagdollOP
haha
thanks for telling me this
but I would suggest don't mix with it, either use or not to use it