// Error components must be Client Components
To handle errors within a specific layout or template, place an error.js file in the layouts parent segment
An error.js boundary will not handle errors thrown in a layout.js component in the same segment
To handle errors within the root layout or template, use a variation of error.js called global-error.js
the function will try to re-render the Error boundary's contents.
component exported from the error.js
global-error.js must define its own <html> and <body> tags
If an error is thrown inside a Server Component, Next.js will forward an Error object (stripped of sensitive error information in production) to the nearest error.js file as the error prop
layouts above the error boundary maintain their state and remain interactive
handle unexpected runtime errors
error.js automatically creates
wraps a nested child segment
as the fallback component
error is thrown within the error boundary
component is rendered
created through special files
layouts parent segment.
Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.