From the course: Master Next.js by Building Scalable Apps with Routing, Databases, and Performance

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Introduction to Pages Router

Introduction to Pages Router

While starting this course, I mentioned the Pages router, which was the default approach for app development in Next.js until version 13 was launched. From Next.js 13, the app router was introduced and is recommended by Next.js. While configuring the first application, we saw that Next recommended us to use the app router. So, what is the difference between the two and how does it affect the performance and development experience? Let's start understanding by creating an application with Pages router. I'll open the terminal and write the command npx create-next-app try-pages. All right, now I will continue with options as discussed in the beginning of this course. And here we get the choice to use app router or not. I'll choose no here and continue. All right, now the application is created with the pages router. Let's understand the project structure. In the app router, we used to have the app folder inside src. Here with the pages router, we have the pages folder and the styles…

Contents