Buckets:
silverwolf-x/project / test /e2e /app-dir /cache-components-errors /fixtures /default /app /use-cache-connection /page.tsx
| import { connection } from 'next/server' | |
| export default async function Page() { | |
| return ( | |
| <> | |
| <p> | |
| This page calls `connection()` in `'use cache'`, which triggers an | |
| error. | |
| </p> | |
| <ConnectionCallingComponent /> | |
| </> | |
| ) | |
| } | |
| async function ConnectionCallingComponent() { | |
| 'use cache' | |
| // Calling connection() 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 connection() | |
| } catch {} | |
| return null | |
| } | |
Xet Storage Details
- Size:
- 544 Bytes
- Xet hash:
- 166c577e73a93e068ba61cb45dab43be7fcc528fc846d740ebdd99a5cbd38183
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.