Next.js · Middle · Question 74 of 75

What happens when navigating between two routes that use different root layouts (via route groups)?

Explanation

Each root layout owns its own <html> and <body>, so the client can't keep the shared tree. Use multiple root layouts for truly separate sections.

Further reading

Problem with a question

Next.js · Middle · question 74

Test yourself

Take the Next.js · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz