What parallel routes do
A single layout can render multiple route segments at once, each with its own loading and error boundaries. Slots are declared with the @name folder convention. The layout receives each slot as a named prop.
app/
layout.tsx # receives @analytics, @team
page.tsx # default slot → children
@analytics/
page.tsx # rendered as `analytics`
loading.tsx
@team/
page.tsx # rendered as `team`
error.tsx
Independent loading and errors
Each slot has its own Suspense and error boundary. The team panel can load fast and the analytics panel can take its time without freezing each other.
Always provide default.tsx
On a hard navigation/refresh, Next.js can't always tell what state a parallel slot was in. Without default.tsx, you get a 404 for the slot. Provide a sensible fallback.