mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Adds a new export from next/cache that acts as a metasyntactic IO boundary. During prerendering with cache components it returns a hanging promise to prevent execution of code that follows it. In all other contexts it resolves as a fulfilled thenable that React can unwrap synchronously. This is gated behind experimental.unstableIO and not ready for general use.
13 lines
282 B
TypeScript
13 lines
282 B
TypeScript
import { getSentinelValue } from './getSentinelValue'
|
|
|
|
export default function Root({ children }: { children: React.ReactNode }) {
|
|
return (
|
|
<html>
|
|
<body>
|
|
<main>{children}</main>
|
|
<div id="layout">{getSentinelValue()}</div>
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|