File size: 465 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
export const revalidate = 0

const delay = 3000

export default async function Page(props) {
  const start = Date.now()
  const data = await fetch(
    `https://next-data-api-endpoint.vercel.app/api/delay?delay=${delay}`,
    { next: { revalidate: 3 } }
  ).then((res) => res.json())
  const fetchDuration = Date.now() - start

  return (
    <>
      <p id="data">
        {JSON.stringify({ fetchDuration, data, now: Date.now(), start })}
      </p>
    </>
  )
}