Still True?
← Back to the board
Routing

Next.js routes live in the pages/ directory. You fetch data with getServerSideProps or getStaticProps.

officialNext.js docs (Pages Router and v13 to v14 era)confidence 40%current as of Oct 2023

In the Pages Router each file under pages/ is a route rendered by its default export. Data fetching uses getServerSideProps for per request work or getStaticProps at build time. The App Router replaced this as the default so new projects do not use these functions.

Related claims