mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
20f5db06fa
Precompile `react@next` and to unlock `cache` and `use` API
25 lines
418 B
JavaScript
25 lines
418 B
JavaScript
import { use } from 'react'
|
|
import Runtime from '../../utils/runtime'
|
|
import Time from '../../utils/time'
|
|
|
|
async function getData() {
|
|
return {
|
|
props: {
|
|
type: 'SSG',
|
|
},
|
|
}
|
|
}
|
|
|
|
export default function Page(props) {
|
|
const { type } = use(getData())
|
|
return (
|
|
<div className="node-rsc-ssg">
|
|
This is a {type} RSC page.
|
|
<br />
|
|
<Runtime />
|
|
<br />
|
|
<Time />
|
|
</div>
|
|
)
|
|
}
|