mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
This API has experimental modes for build validation but the dev validation is going to be stable in the next release.
24 lines
898 B
TypeScript
24 lines
898 B
TypeScript
import { Suspense, type ReactNode } from 'react'
|
|
|
|
// Validation level is not set in next.config.ts, so the framework default
|
|
// applies. The default is 'warning' — implicit validation fires on bare
|
|
// page/default segments in dev only (build is unaffected unless a segment
|
|
// explicitly escalates with `level: 'experimental-error'`).
|
|
//
|
|
// Children are wrapped in Suspense so that pages with runtime data
|
|
// accessed at the top of the page don't fail static-shell validation
|
|
// (the Suspense fallback renders into the static shell). Instant
|
|
// validation flags "Suspense too high for instant navigation" as an
|
|
// instant-specific violation when it runs.
|
|
export const instant = false
|
|
|
|
export default function RootLayout({ children }: { children: ReactNode }) {
|
|
return (
|
|
<html>
|
|
<body>
|
|
<Suspense fallback={<p>loading…</p>}>{children}</Suspense>
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|