Buckets:
silverwolf-x/project / test /e2e /app-dir /cache-components-errors /fixtures /default /app /use-cache-headers /page.tsx
| import { headers } from 'next/headers' | |
| export default async function Page() { | |
| return ( | |
| <> | |
| <p> | |
| This page accesses `headers()` in `'use cache'`, which triggers an | |
| error. | |
| </p> | |
| <HeadersReadingComponent /> | |
| </> | |
| ) | |
| } | |
| async function HeadersReadingComponent() { | |
| 'use cache' | |
| // Reading headers in a cache context is not allowed. We're try/catching here | |
| // to ensure that this error is shown even when it's caught in userland. | |
| try { | |
| await headers() | |
| } catch {} | |
| return null | |
| } | |
Xet Storage Details
- Size:
- 528 Bytes
- Xet hash:
- db6b5d039870302eaa3864a3c9e03035788b4e8e3a51a66d00ab6dfb2643ccbd
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.