mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
### What? Relaxes the overly strict `default.tsx` validation for parallel routes to only require the file when it's actually needed (non-leaf segments with routable children). ### Why? The initial validation for parallel routes required `default.tsx` files for all parallel route slots to prevent a specific issue: when navigating to child routes, missing `default.tsx` files could cause silent 404s in slot content, creating a confusing user experience. However, this validation was **too strict** - it required `default.tsx` even in cases where it wasn't actually necessary: 1. **Leaf segments** (routes with no child routes) - There are no child routes to navigate to, so the 404 issue cannot occur 2. **Route groups** - These are organizational folders and aren't routable themselves 3. **Catch-all parameters** - The matched segments are dynamic parameter values, not actual child route segments This caused false positive build errors for valid parallel route configurations that don't have the underlying navigational issue. NAR-448
12 lines
157 B
TypeScript
12 lines
157 B
TypeScript
export default function RootLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode
|
|
}) {
|
|
return (
|
|
<html>
|
|
<body>{children}</body>
|
|
</html>
|
|
)
|
|
}
|