silverwolf-x's picture
download
raw
548 Bytes
import Document, { Html, Head, Main, NextScript } from 'next/document'
const docValue = await Promise.resolve('doc value')
class MyDocument extends Document {
static async getInitialProps(ctx) {
const initialProps = await Document.getInitialProps(ctx)
return { ...initialProps, docValue }
}
render() {
return (
<Html>
<Head />
<body>
<div id="doc-value">{this.props.docValue}</div>
<Main />
<NextScript />
</body>
</Html>
)
}
}
export default MyDocument

Xet Storage Details

Size:
548 Bytes
·
Xet hash:
819dd704e9475fef6288a44e603b0a51c54e0a5f8d4ffd693ef405fe6ef173b8

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.