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

27 lines
619 B
TypeScript

import { connection } from 'next/server'
import { ReactNode } from 'react'
export const instant = { level: 'experimental-error' }
export default async function Layout({ children }: { children: ReactNode }) {
return (
<>
<div>
<p>
This layout has a dynamic hole without a suspense. There's a
loading.js at this level, but loading.js goes below the layout, so
this should fail validation.
</p>
<Dynamic />
</div>
<hr />
{children}
</>
)
}
async function Dynamic() {
await connection()
return 'Dynamic content from layout'
}