react-code-dataset / next.js /test /development /app-dir /cache-components-dev-warmup /app /loading.tsx
Download next.js/test/development/app-dir/cache-components-dev-warmup/app/loading.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 268 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/development/app-dir/cache-components-dev-warmup/app/loading.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/development/app-dir/cache-components-dev-warmup/app/loading.tsx
-
curl -L -o loading.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/development/app-dir/cache-components-dev-warmup/app/loading.tsx
268 Bytes
| import { fetchCached, getCachedData } from './data-fetching' | |
| export default async function Loading() { | |
| await fetchCached( | |
| 'https://next-data-api-endpoint.vercel.app/api/random?key=cachedpage' | |
| ) | |
| await getCachedData('page') | |
| return <main>loading...</main> | |
| } | |