next.js/test/e2e/app-dir/app-rendering/app/ssr-only/layout.js
layout.js21 lines317 B
import { use } from 'react'

export const revalidate = 0

async function getData() {
  return {
    message: 'hello from layout',
  }
}

export default function GsspLayout(props) {
  const data = use(getData())

  return (
    <>
      <h1 id="layout-message">{data.message}</h1>
      {props.children}
    </>
  )
}
Quest for Codev2.0.0
/
SIGN IN