react-code-dataset
/
next.js
/test
/development
/app-dir
/server-components-hmr-cache
/lib
/fetch-random-value.ts
| export async function fetchRandomValue(key: string) { | |
| const url = new URL('https://next-data-api-endpoint.vercel.app/api/random') | |
| url.searchParams.set('key', key) | |
| const res = await fetch(url, { cache: 'no-store' }) | |
| return res.text() | |
| } | |