Currently Nextjs uses Two Routing methods was PageRouter and AppRouter along side ReactRouter
#PageRouter
If you have worked with older versions of Next.js, you’ve probably come across the Pages Router — Next.js’s file-based routing system.
With the Pages Router, every file inside the pages directory could represent a route in your application. For example, creating pages/about.js automatically made /about available in the browser.
This approach was one of the things that made Next.js different from a traditional React application. In a React app, developers commonly used libraries such as React Router to manually configure routes. In Next.js, routing was largely handled for us through the file structure.
#AppRouter
But modern Next.js introduced another approach: the App Router.
The App Router uses a folder-based routing system built around the app directory. Instead of treating individual files as routes, folders represent URL segments, while special files such as page.js define the actual UI for that route.
app/
├── page.js → /
├── about/
│ └── page.js → /about
└── blog/
├── page.js → /blog
└── post/
└── page.js → /blog/post
Put Your Thought or Query Here