Files
Josh StoryandGitHub d424aa8ec4 Stabilize unstable_instant (#94578)
This API has experimental modes for build validation but the dev
validation is going to be stable in the next release.
2026-06-09 13:50:25 -07:00

24 lines
826 B
TypeScript

import type { ReactNode } from 'react'
import { LazyClientWrapperWithNoSSR } from './lazy-client'
import { connection } from 'next/server'
// Make sure that the holes from this layout aren't factored in for validation
// (otherwise, we'd check a navigation into it from the root layout and fail)
export const instant = false
export default async function Layout({ children }: { children: ReactNode }) {
await connection() // Prevent the error from failing the prerender in build
return (
<>
<div>
<p>
This layout renders a component wrapped in next/dynamic with ssr:
false around the children slot. This blocks the children slot so it
prevents validation.
</p>
<LazyClientWrapperWithNoSSR>{children}</LazyClientWrapperWithNoSSR>
</div>
</>
)
}