Layouts (Client Component)
Nested Layouts
Grouped Layouts
Streaming with Suspense
Root Layouts soon
File Conventions (Client Component)
Loading
Error
Components (Client Component)
Hooks
Client Context
Component Tree
Styling (Client Component)
CSS and CSS-in-JS
client-component
/
children
Error Handling
  • `error.js` defines the error boundary for a route segment and the children below it. It can be used to show specific error information, and functionality to attempt to recover from the error.
  • Trying navigation pages and triggering an error in nested layouts.
  • Note: Error boundaries don't yet work in development.
Created by the Next.js team at Vercel. View the code or deploy your own.