Question · Next.js course · Module 2: Routing and Layouts
State Preservation in layout.tsx
What happens to the layout.tsx component when navigating between pages that share the same layout?
Answer options
- It is re-rendered on every navigation
- It is not re-rendered - it preserves state
- It is destroyed and created from scratch
- It is cached in the browser as a static file
Show the answer
Correct answer:
- It is not re-rendered - it preserves state