arrow_backBACK TO DRILLS
Blue BeltnextjsPREMIUM
index.js vs page.js Belong to Two Mutually Exclusive Next.js Routing Systems
A developer working across two Next.js codebases sees one project use an index.js file to define a folder's root route, and another project use a page.js file for the same purpose. They assume one of the two files is simply a legacy naming convention that still works interchangeably with the other.
What is the actual relationship between index.js and page.js as route-defining files in Next.js?