react-code-dataset / next.js /test /e2e /app-dir /app-static /app /variable-config-revalidate /revalidate-3 /page.js
Download next.js/test/e2e/app-dir/app-static/app/variable-config-revalidate/revalidate-3/page.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 456 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/app-static/app/variable-config-revalidate/revalidate-3/page.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/app-dir/app-static/app/variable-config-revalidate/revalidate-3/page.js
-
curl -L -o page.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/app-static/app/variable-config-revalidate/revalidate-3/page.js
456 Bytes
| export const revalidate = 3 | |
| export const metadata = { | |
| title: 'Cache Test', | |
| } | |
| export default async function Page() { | |
| const data = await fetch( | |
| 'https://next-data-api-endpoint.vercel.app/api/random', | |
| { | |
| next: { | |
| revalidate: 9, | |
| }, | |
| } | |
| ).then((res) => res.text()) | |
| return ( | |
| <> | |
| <p>/variable-config-revalidate/revalidate-3</p> | |
| <p id="date">{Date.now()}</p> | |
| <p id="random-data">{data}</p> | |
| </> | |
| ) | |
| } | |