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.
24 lines
499 B
TypeScript
24 lines
499 B
TypeScript
import { connection } from 'next/server'
|
|
import { Suspense } from 'react'
|
|
|
|
export const instant = { level: 'experimental-error' }
|
|
|
|
export default function Page() {
|
|
return (
|
|
<Suspense fallback={<div>Loading...</div>}>
|
|
<main>
|
|
<p>
|
|
The page blocks on dynamic content, but shows a fallback, so it's
|
|
instant
|
|
</p>
|
|
<Dynamic />
|
|
</main>
|
|
</Suspense>
|
|
)
|
|
}
|
|
|
|
async function Dynamic() {
|
|
await connection()
|
|
return 'Dynamic content from page'
|
|
}
|