mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
27 lines
467 B
TypeScript
27 lines
467 B
TypeScript
import React, { Suspense } from 'react'
|
|
import { Client } from './client'
|
|
|
|
async function Component() {
|
|
await new Promise((resolve) => setTimeout(resolve, 200))
|
|
return (
|
|
<div>
|
|
<h1>Component</h1>
|
|
<Client />
|
|
</div>
|
|
)
|
|
}
|
|
|
|
function Suspensey() {
|
|
return (
|
|
<Suspense fallback={<div>Loading...</div>}>
|
|
<Component />
|
|
</Suspense>
|
|
)
|
|
}
|
|
|
|
export default function Page() {
|
|
return <Suspensey />
|
|
}
|
|
|
|
export const dynamic = 'force-dynamic'
|