#NextJs Project Structure

1 messages · Page 1 of 1 (latest)

trail raft
#

Hello Devs, I'm confused about the "pages" folder. If i want to create a /login route I only need to create login folder under app dir. In NextJs Documentation, the app folder and pages folder are on same level. So when to use pages folder?

near iglooBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

trail raft
#

is my project structure correct?

#

@honest tangle

honest tangle
#

Can you link me to where your seeing that image?

trail raft
#

here

honest tangle
#

So you wont use the pages router at all.

#

You will just use the app router.

trail raft
honest tangle
#

They are two completely different routing structures, app router is newer.

#

Yes it is

#

Aside from this one spot, as long as you have app router selected here, you are in the correct spot for the app router documentation

trail raft
#

Thank you sir Im transitioning from plain react to nextjs, im so tired creating route manually lol

honest tangle
#

Hahah, nextjs is great! 🙂 Just make sure to post your questions here, people help out here as often as they can/want to.

trail raft
#

Yess, thank you again sir!!

honest tangle
#

Make sure to close this entry by marking an answer

honest tangle
honest tangle