mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
This API has experimental modes for build validation but the dev validation is going to be stable in the next release.
20 lines
565 B
TypeScript
20 lines
565 B
TypeScript
import { cookies } from 'next/headers'
|
|
|
|
// This page opts out with `false`, but the parent layout has a
|
|
// static config. At depths where both are in the new tree, the
|
|
// layout's config wins and validation still catches this page's
|
|
// blocking cookies() call without Suspense.
|
|
export const instant = false
|
|
|
|
export default async function Page() {
|
|
await cookies()
|
|
return (
|
|
<main>
|
|
<p>
|
|
This page has instant = false but the parent layout has prefetch:
|
|
'static'. The layout's config still triggers validation.
|
|
</p>
|
|
</main>
|
|
)
|
|
}
|