Next.js Discord

Discord Forum

Question to Project Layout

Unanswered
Yacare Caiman posted this in #help-forum
Open in Discord
Avatar
Yacare CaimanOP
Hello Folks,
I am currently looking into Next.js.
I have made my way trough the Next.js Tutorial Section and troughout this guide i was met with a Project Structure that resembled something like this:
.
├── components
├── node_modules
├── pages
    └── index.js
├── public
└── styles

Now I have created a Project using the command npx create-next-app@latest and suddenly the Project Structure is something like this:
.
├── public
└── src
└── app
    ├── globals.css
    ├── layout.tsx
    └── page.tsx

how do these two correlate to one another?
I imagine if i create a pages folder inside app next will automatically pick up on that and turn the latter project structure in the first one, or am I mistaken?

9 Replies

Avatar
Yi Lon Ma
the pages folder is older way to create routes and the app is the new way
Avatar
Yacare CaimanOP
Is there any Documentation/Guide for the new way of doing pages?
Avatar
Yi Lon Ma
the docs got you covered
go through these step by step
Image
Avatar
Yacare CaimanOP
Okay, thanks!
Too bad the Learn Next.js Button on the mainpage links to an outdated Version of doing things.
Avatar
Yi Lon Ma
well its not outdated, you can still use it
I am still using it because I am not quite ready to convert my older applications to the app router
and probably never will