NextJS Routing & Layout issue
Unanswered
Brown bear posted this in #help-forum
Brown bearOP
Hey, new to NextJS here.
Created new NextJS project, chose SRC option. I have the page file in
Where can I place this pages folder so both routing and root layout get applied ?
Tried both
Created new NextJS project, chose SRC option. I have the page file in
src/app and I needed another page. I created folder in src/pagesand my page. Routing works, but the root layout (fromsrc/app/layout ) doesnt seem to get applied. Where can I place this pages folder so both routing and root layout get applied ?
Tried both
src and root, but while routing works, layout doesnt.1 Reply
Brown bearOP
I was unknowingly using a combination of
app directory and pages directory. Placing my page in app/PAGENAME/page.tsx fixes the issue.