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.
23 lines
432 B
TypeScript
23 lines
432 B
TypeScript
import { connection } from 'next/server'
|
|
import { ReactNode, Suspense } from 'react'
|
|
|
|
export const instant = false
|
|
|
|
export default function RootLayout({ children }: { children: ReactNode }) {
|
|
return (
|
|
<html>
|
|
<body>
|
|
<Suspense fallback="...">
|
|
<Now />
|
|
</Suspense>
|
|
{children}
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|
|
|
|
async function Now() {
|
|
await connection()
|
|
return <span>{Date.now()}</span>
|
|
}
|