Buckets:
silverwolf-x/project / test /development /app-dir /async-request-warnings /app /request /draftMode /page.tsx
| import { draftMode } from 'next/headers' | |
| function Component() { | |
| // Cast to any as we removed UnsafeUnwrapped types, but still need to test with the sync access | |
| const isEnabled = (draftMode() as any).isEnabled | |
| ;(draftMode() as any).enable() | |
| const clonedDraftMode = { | |
| ...(draftMode() as any), | |
| } | |
| return <pre>{JSON.stringify({ clonedDraftMode, isEnabled }, null, 2)}</pre> | |
| } | |
| export default function Page() { | |
| const isEnabled = (draftMode() as any).isEnabled | |
| return ( | |
| <> | |
| <pre>{JSON.stringify({ isEnabled }, null, 2)}</pre> | |
| <Component /> | |
| <Component /> | |
| </> | |
| ) | |
| } | |
Xet Storage Details
- Size:
- 604 Bytes
- Xet hash:
- c1dc4ef51dad9fc8906b204af99d192526875d62493c8681f8965931bcaaae9f
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.