DEV Community

Cover image for Move from Pages to App Router in you nextjs app
Engineering Expert
Engineering Expert

Posted on

Move from Pages to App Router in you nextjs app

NextJs 13 introduced App router. This basically means instead of the old "pages" directory you could use this more modern, more developer friendly app router.

In the old pages directory you had to design your components in a particular way and use apis like GetStaticProps and other apis to make sure your pages could be generated during build time.

However with app directory you can use React server components and use more friendly fetch and async/await apis to achieve the same thing but with much cleaner and readable API.

Learn more about why you should start using app router and ditch pages in nextjs here.

Top comments (0)