file convention

A file name that Next.js gives a special meaning, such as page.tsx for a route's content or error.tsx for its error screen.

In more detail

Next.js finds these files by name inside app/ and wires them together for you: layout wraps template, which wraps error, loading and not-found boundaries, which wrap the page. Any other file name is ignored by the router.

Related terms

Taught in

References