next.js/test/e2e/app-dir/cache-components/app/random/cached/page.tsx
page.tsx20 lines367 B
import { SentinelValue } from '../../getSentinelValue'

export default async function Page() {
  const random = await getRandom()
  return (
    <div>
      <label>random</label>
      <span id="value">{random}</span>
      <span id="page">
        <SentinelValue />
      </span>
    </div>
  )
}

async function getRandom() {
  'use cache'
  return Math.random()
}
Quest for Codev2.0.0
/
SIGN IN