You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(use-cache): add missing switcher code blocks and types in examples (vercel#74083)
Hi Team.
This PR updates the use cache directive documentation with the following
changes:
- Added switcher code blocks for `next.config.ts` and `next.config.js`
examples.
- Updated missing `switcher` for `Bookings` component examples to
include switcher support.
- Added missing types for `ClientComponent` of tsx block.
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Copy file name to clipboardExpand all lines: docs/01-app/04-api-reference/01-directives/use-cache.mdx
+19-4Lines changed: 19 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ The `use cache` directive designates a component and/or a function to be cached.
19
19
20
20
Enable support for the `use cache` directive with the [`dynamicIO`](/docs/app/api-reference/config/next-config-js/dynamicIO) flag in your `next.config.ts` file:
Then, you can use the `use cache` directive at the file, component, or function level:
35
46
36
47
```tsx
@@ -137,7 +148,7 @@ You can use `use cache` at the component level to cache any fetches or computati
137
148
138
149
The props are serialized and form part of the cache key, and the cache entry will be reused as long as the serialized props produce the same value in each instance.
0 commit comments