Nested Layouts in the App Router
Each route segment can define a layout.tsx that wraps its children; nested segments compose into a layout tree, and on navigation only the segments below the shared layout re-render while parent layouts preserve their state and do not re-fetch. The root layout is required and owns the html and body tags.
This Concept is waiting for its first lesson!
Each route segment can define a layout.tsx that wraps its children; nested segments compose into a layout tree, and on navigation only the segments below the shared layout re-render while parent layouts preserve their state and do not re-fetch. The root layout is required and owns the html and body tags.
Are you a teacher? Sign in to start contributing.
Sign In