Before the App Router, Next.js used the Pages Router: files in pages/getStaticProps, getServerSideProps, and API routes in pages/api.
Mapping concepts
| Pages Router | App Router |
|---|---|
pages/index.tsx | app/page.tsx |
pages/_app.tsx | app/layout.tsx |
getServerSideProps | async Server Component + fetch |
pages/api/* | app/**/route.ts |
Why you still see it
Large production apps may migrate incrementally. Read legacy codebases, build new features in app/ when using the hybrid approach, or plan a structured migration.
Self-check
- What replaces
getStaticPropsin App Router? - Where did API routes live in Pages Router?