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

30 lines
847 B
TypeScript

// This layout has prefetching disabled because it performs uncached dynamic
// I/O (connection()). Static parents above it should be able to inline through
// it and into the static child below, because this layout acts as a transparent
// pass-through — its slot in the bundle is null but the chain isn't broken.
import { ReactNode, Suspense } from 'react'
import { connection } from 'next/server'
export const instant = false
export const prefetch = 'force-disabled'
async function DynamicContent() {
await connection()
return <p id="layout-instant-false-passthrough">Dynamic layout</p>
}
export default function InstantFalsePassthroughLayout({
children,
}: {
children: ReactNode
}) {
return (
<div>
<Suspense fallback={<p>Loading...</p>}>
<DynamicContent />
</Suspense>
{children}
</div>
)
}