NextJS pages or app folder structure?

Disclaimer: am noob. Theo's T3 Stack tutorial uses the pages folder structure when creating its nextjs app. What are the benefits of routing with the newer app (pages/layout) structure? Also, is it easy to migrate a project to this new structure. I'm creating an app right now, but am scared to change the structure because I'm worried about potential bugs when restructuring. Thanks!
2 Replies
GetPsyched
GetPsyched9mo ago
I started NextJS when the app router was unstable, so I never had to migrate, but due to NextJS allowing you to have both page and app routing at once in a project, you can very easily incrementally migrate from one to another I personally prefer the app router. If you want to read which one should you follow, read this article: https://nextjs.org/docs#app-router-vs-pages-router
derfcode
derfcodeOP9mo ago
Thanks! I guess I might as well migrate now before my app gets more complex. Found this link to help as well https://nextjs.org/docs/pages/building-your-application/upgrading/app-router-migration
Upgrading: From Pages to App | Next.js
Learn how to upgrade your existing Next.js application from the Pages Router to the App Router.
Want results from more Discord servers?
Add your server