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

21 lines
679 B
TypeScript

// Same shape as bare/page.tsx — runtime data accessed outside a Suspense
// boundary — but with an explicit `instant = { level: 'experimental-error' }`.
// Even though the validation level is 'manual-warning', the explicit
// per-segment opt-in escalates validation to error level in both dev and
// build, and the violation should fail the build.
import { connection } from 'next/server'
export const instant = { level: 'experimental-error' as const }
export default async function Page() {
await connection()
return (
<main>
<p>
explicit-error page (instant level: experimental-error), runtime data at
the top.
</p>
</main>
)
}