Folder structure
Unanswered
Spectacled Caiman posted this in #help-forum
Spectacled CaimanOP
I've been learning vanilla react and just been using the router dom package, I'm moving onto next now but I'm a bit confused on how folders work in next and can't really find anything about folders in the docs, In react I could have a pages folder with all of my pages inside and the link wouldn't have to include it like in the next docs
Is there a way I can do this or should I not even bother trying to?
url/pages/home
instead of
url/home in vanilla react
Is there a way I can do this or should I not even bother trying to?
7 Replies
I don't understand what you are trying to do but the docs have extensive information about folder and files structures:
- https://nextjs.org/docs/app/getting-started/project-structure
- https://nextjs.org/docs/app/getting-started/layouts-and-pages
- https://nextjs.org/docs/app/building-your-application/routing
- https://nextjs.org/docs/app/getting-started/project-structure
- https://nextjs.org/docs/app/getting-started/layouts-and-pages
- https://nextjs.org/docs/app/building-your-application/routing
@Rafael Almeida I don't understand what you are trying to do but the docs have extensive information about folder and files structures:
- https://nextjs.org/docs/app/getting-started/project-structure
- https://nextjs.org/docs/app/getting-started/layouts-and-pages
- https://nextjs.org/docs/app/building-your-application/routing
Spectacled CaimanOP
Thanks I'm looking at the docs, but I don't really understand how routing works
/home is coming up as 404 but if routing is automatic it should work no?
Asian black bear
Then you haven't read the docs that Rafael just linked.
It clearly states you need to create an actual
page.tsx
file.For example in
/app/home/page.tsx