Unverified Commit d1b02c6d authored by Joseph's avatar Joseph Committed by GitHub

Docs/v16 feedback (#85259)

Co-authored-by: 's avatarRich Haines <hello@richardhaines.dev>
Co-authored-by: 's avatarvercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
parent eebff819
......@@ -42,7 +42,7 @@ Top-level files are used to configure your application, manage dependencies, run
| [`.env.local`](/docs/app/guides/environment-variables) | Local environment variables |
| [`.env.production`](/docs/app/guides/environment-variables) | Production environment variables |
| [`.env.development`](/docs/app/guides/environment-variables) | Development environment variables |
| [`.eslintrc.json`](/docs/app/api-reference/config/eslint) | Configuration file for ESLint |
| [`eslint.config.mjs`](/docs/app/api-reference/config/eslint) | Configuration file for ESLint |
| `.gitignore` | Git files and folders to ignore |
| `next-env.d.ts` | TypeScript declaration file for Next.js |
| `tsconfig.json` | Configuration file for TypeScript |
......
......@@ -424,6 +424,10 @@ export default async function Page() {
}
```
#### `runtime = 'edge'`
**Not supported.** Cache Components requires Node.js runtime and will throw errors with [Edge Runtime](/docs/app/api-reference/edge).
## Before vs. after Cache Components
Understanding how Cache Components changes your mental model:
......
---
title: 'use cache: private'
description: 'Learn how to use the `"use cache: private"` directive to enable runtime prefetching of personalized content in your Next.js application.'
version: canary
related:
title: Related
description: View related API references.
......
---
title: 'use cache: remote'
description: 'Learn how to use the `"use cache: remote"` directive to enable caching in dynamic contexts in your Next.js application.'
version: canary
related:
title: Related
description: View related API references.
......
......@@ -147,7 +147,9 @@ export const fetchCache = 'auto'
### `runtime`
We recommend using the Node.js runtime for rendering your application, and the Edge runtime for Proxy.
We recommend using the Node.js runtime for rendering your application. This option cannot be used in [Proxy](/docs/app/api-reference/file-conventions/proxy).
> **Good to know**: Using `runtime: 'edge'` is **not supported** for Cache Components.
```tsx filename="layout.tsx | page.tsx | route.ts" switcher
export const runtime = 'nodejs'
......
---
title: cacheLife
description: Learn how to set up cacheLife configurations in Next.js.
version: canary
---
The `cacheLife` option allows you to define **custom cache profiles** when using the [`cacheLife`](/docs/app/api-reference/functions/cacheLife) function inside components or functions, and within the scope of the [`use cache` directive](/docs/app/api-reference/directives/use-cache).
......
......@@ -15,19 +15,19 @@ Get linting working quickly with the ESLint CLI (flat config):
1. Install ESLint and the Next.js config:
```bash package="pnpm"
pnpm add -D eslint eslint-config-next @eslint/eslintrc
pnpm add -D eslint eslint-config-next
```
```bash package="npm"
npm i -D eslint eslint-config-next @eslint/eslintrc
npm i -D eslint eslint-config-next
```
```bash package="yarn"
yarn add --dev eslint eslint-config-next @eslint/eslintrc
yarn add --dev eslint eslint-config-next
```
```bash package="bun"
bun add -d eslint eslint-config-next @eslint/eslintrc
bun add -d eslint eslint-config-next
```
2. Create `eslint.config.mjs` with the Next.js config:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment