react-code-dataset / next.js /test /e2e /app-dir /app-static /app /react-fetch-deduping-node /page.js
Download next.js/test/e2e/app-dir/app-static/app/react-fetch-deduping-node/page.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 532 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/app-static/app/react-fetch-deduping-node/page.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/app-dir/app-static/app/react-fetch-deduping-node/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/react-fetch-deduping-node/page.js
532 Bytes
| export default async function Page() { | |
| const data1 = await fetch( | |
| 'https://next-data-api-endpoint.vercel.app/api/random?1', | |
| { | |
| next: { | |
| revalidate: 0, | |
| }, | |
| } | |
| ).then((res) => res.text()) | |
| const data2 = await fetch( | |
| 'https://next-data-api-endpoint.vercel.app/api/random?1', | |
| { | |
| next: { | |
| revalidate: 0, | |
| }, | |
| } | |
| ).then((res) => res.text()) | |
| return ( | |
| <> | |
| <p>/react-fetch-deduping</p> | |
| <p id="data-1">{data1}</p> | |
| <p id="data-2">{data2}</p> | |
| </> | |
| ) | |
| } | |