mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
c24c4ac3f5
Dynamic is disallowed unless a Suspense boundary is above it. This now applies to metadaata (though this shouldn't matter because it now streams) and viewport. To allow for fully dynamic routes including viewport you must put a Suspense boundary around your root layout.
16 lines
238 B
TypeScript
16 lines
238 B
TypeScript
import { Suspense } from 'react'
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode
|
|
}) {
|
|
return (
|
|
<Suspense>
|
|
<html lang="en">
|
|
<body>{children}</body>
|
|
</html>
|
|
</Suspense>
|
|
)
|
|
}
|