LESSON 1.2

Layouts, templates, and shared UI

06:20·17,298 learners
Mira KovacMira Kovac
Next lesson

In this lesson you will

  • Nest layouts to share chrome across a section
  • Know when state persistence makes a template the wrong choice
  • Colocate loading and error UI with the layout it belongs to

Layouts persist across navigations and keep their state; templates remount on every navigation. Choosing the wrong one is why your sidebar scroll position keeps resetting.

What this lesson covers

  • Nest layouts to share chrome across a section
  • Know when state persistence makes a template the wrong choice
  • Colocate loading and error UI with the layout it belongs to

This lesson sits in Routing and Layouts, part of Next.js App Router in Depth. It assumes what came before it and leads directly into the next lesson in the module.

UP NEXT

1.3 · Dynamic routes and route params

08:16

Next.js App Router in Depth

8%

Every lesson, searchable to the second.

© 2026 BIBLION

PRIVACY · TERMS · CONTACT