global-error.tsx

The error boundary for the root layout itself, which replaces the whole page when the root layout crashes.

In more detail

Because it replaces the root layout it must render its own html and body tags. It is rarely triggered, but it keeps the site from showing a blank page.

Related terms

Taught in

References