next.js/test/e2e/switchable-runtime/app/node-rsc-ssr/page.js
page.js25 lines429 B
import { use } from 'react'
import Runtime from '../../utils/runtime'
import Time from '../../utils/time'

async function getData() {
  return {
    type: 'SSR',
  }
}

export const runtime = 'nodejs'

export default function Page(props) {
  const { type } = use(getData())
  return (
    <div className="node-rsc-ssr">
      This is a {type} RSC page.
      <br />
      <Runtime />
      <br />
      <Time />
    </div>
  )
}
Quest for Codev2.0.0
/
SIGN IN