Performance: Parallel routes (@slot)
MEDIUM IMPACT
Parallel routes with @slot affect how quickly multiple UI sections load and render simultaneously, improving perceived page speed and interaction readiness.
export default function Page({ sidebar, mainContent, footer }) { return ( <> {sidebar} {mainContent} {footer} </> ) }
export default function Page() { return ( <> <Sidebar /> <MainContent /> <Footer /> </> ) }
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Sequential route loading | Single DOM tree built after all data loads | Multiple reflows as components mount sequentially | High paint cost due to delayed content | [X] Bad |
| Parallel routes with @slot | Multiple smaller DOM trees built independently | Fewer reflows as components render in parallel | Lower paint cost with faster visible content | [OK] Good |