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.
33 lines
760 B
TypeScript
33 lines
760 B
TypeScript
import { cookies } from 'next/headers'
|
|
import { connection } from 'next/server'
|
|
|
|
export const instant = { level: 'experimental-error' }
|
|
|
|
export default async function Page() {
|
|
return (
|
|
<main>
|
|
<p>
|
|
This page doesn't wrap runtime/dynamic components in suspense, but it
|
|
has a loading.tsx. a self-navigation with a different search param value
|
|
would block, but we accept that.
|
|
</p>
|
|
<div>
|
|
<Runtime />
|
|
</div>
|
|
<div>
|
|
<Dynamic />
|
|
</div>
|
|
</main>
|
|
)
|
|
}
|
|
|
|
async function Runtime() {
|
|
await cookies()
|
|
return <div id="runtime-content">Runtime content from page</div>
|
|
}
|
|
|
|
async function Dynamic() {
|
|
await connection()
|
|
return <div id="dynamic-content">Dynamic content from page</div>
|
|
}
|