Unverified Commit 3dcbcf51 authored by Delba de Oliveira's avatar Delba de Oliveira Committed by GitHub

Docs: Add version tags for RC and experimental features (#68840)

Closes:
https://linear.app/vercel/issue/DOC-3158/update-feature-tags-to-rcexperimental
parent 01b6ec52
...@@ -62,6 +62,8 @@ export function register() { ...@@ -62,6 +62,8 @@ export function register() {
### `onRequestError` (optional) ### `onRequestError` (optional)
> This API is available in Next.js canary.
You can optionally export an `onRequestError` function to track and send **server** errors to an observability tool. You can optionally export an `onRequestError` function to track and send **server** errors to an observability tool.
```ts filename="instrumentation.ts" switcher ```ts filename="instrumentation.ts" switcher
......
...@@ -68,7 +68,10 @@ fetch(`https://...`, { cache: 'force-cache' | 'no-store' }) ...@@ -68,7 +68,10 @@ fetch(`https://...`, { cache: 'force-cache' | 'no-store' })
- If there is a match and it is fresh, it will be returned from the cache. - If there is a match and it is fresh, it will be returned from the cache.
- If there is no match or a stale match, Next.js will fetch the resource from the remote server and update the cache with the downloaded resource. - If there is no match or a stale match, Next.js will fetch the resource from the remote server and update the cache with the downloaded resource.
> **Good to know**: The `no-cache` option behaves the same way as `no-store` in Next.js. > **Good to know**:
>
> - In version 15, the default cache option was changed from `'force-cache'` to `'no-store'`. If you're using an older version of Next.js, the default cache option is `'force-cache'`.
> - The `no-cache` option behaves the same way as `no-store` in Next.js.
### `options.next.revalidate` ### `options.next.revalidate`
......
--- ---
title: unstable_after (experimental) title: unstable_after
description: API Reference for the unstable_after function. description: API Reference for the unstable_after function.
version: RC
--- ---
> This API is **experimental** and subject to change.
`unstable_after()` allows you to schedule work to be executed after a response is finished. This is useful for tasks and other side effects that should not block the response, such as logging and analytics. `unstable_after()` allows you to schedule work to be executed after a response is finished. This is useful for tasks and other side effects that should not block the response, such as logging and analytics.
It can be used in [Server Components](/docs/app/building-your-application/rendering/server-components) (including [`generateMetadata`](https://nextjs.org/docs/app/api-reference/functions/generate-metadata)), [Server Actions](/docs/app/building-your-application/data-fetching/server-actions-and-mutations), [Route Handlers](/docs/app/building-your-application/routing/route-handlers), and [Middleware](/docs/app/building-your-application/routing/middleware). It can be used in [Server Components](/docs/app/building-your-application/rendering/server-components) (including [`generateMetadata`](https://nextjs.org/docs/app/api-reference/functions/generate-metadata)), [Server Actions](/docs/app/building-your-application/data-fetching/server-actions-and-mutations), [Route Handlers](/docs/app/building-your-application/routing/route-handlers), and [Middleware](/docs/app/building-your-application/routing/middleware).
......
--- ---
title: unstable_cache (experimental) title: unstable_cache
description: API Reference for the unstable_cache function. description: API Reference for the unstable_cache function.
version: unstable
--- ---
`unstable_cache` allows you to cache the results of expensive operations, like database queries, and reuse them across multiple requests. `unstable_cache` allows you to cache the results of expensive operations, like database queries, and reuse them across multiple requests.
......
--- ---
title: unstable_noStore (experimental) title: unstable_noStore
description: API Reference for the unstable_noStore function. description: API Reference for the unstable_noStore function.
version: unstable
--- ---
`unstable_noStore` can be used to declaratively opt out of static rendering and indicate a particular component should not be cached. `unstable_noStore` can be used to declaratively opt out of static rendering and indicate a particular component should not be cached.
......
--- ---
title: unstable_rethrow (experimental) title: unstable_rethrow
description: API Reference for the unstable_rethrow function. description: API Reference for the unstable_rethrow function.
version: unstable
--- ---
`unstable_rethrow` can be used to avoid catching internal errors thrown by Next.js when attempting to handle errors thrown in your application code. `unstable_rethrow` can be used to avoid catching internal errors thrown by Next.js when attempting to handle errors thrown in your application code.
......
--- ---
title: cssChunking (Experimental) title: cssChunking
description: Use the `cssChunking` option to control how CSS files are chunked in your Next.js application. description: Use the `cssChunking` option to control how CSS files are chunked in your Next.js application.
version: experimental
--- ---
CSS Chunking is a strategy used to improve the performance of your web application by splitting and re-ordering CSS files into chunks. This allows you to load only the CSS that is needed for a specific route, instead of loading all the application's CSS at once. CSS Chunking is a strategy used to improve the performance of your web application by splitting and re-ordering CSS files into chunks. This allows you to load only the CSS that is needed for a specific route, instead of loading all the application's CSS at once.
......
...@@ -22,6 +22,8 @@ description: Optimized pages include an indicator to let you know if it's being ...@@ -22,6 +22,8 @@ description: Optimized pages include an indicator to let you know if it's being
## `appIsrStatus` (Static Indicator) ## `appIsrStatus` (Static Indicator)
> This option is available in Next.js canary.
Next.js displays a static indicator in the bottom corner of the screen that signals if a route will be prerendered at build time. This makes it easier to understand whether a route is static or dynamic, and for you to identify if a route [opts out of static rendering](#static-route-not-showing-the-indicator). Next.js displays a static indicator in the bottom corner of the screen that signals if a route will be prerendered at build time. This makes it easier to understand whether a route is static or dynamic, and for you to identify if a route [opts out of static rendering](#static-route-not-showing-the-indicator).
<Image <Image
......
...@@ -51,9 +51,9 @@ Returns `Promise<void>`. Learn more about [revalidating data](/docs/app/building ...@@ -51,9 +51,9 @@ Returns `Promise<void>`. Learn more about [revalidating data](/docs/app/building
## Version History ## Version History
| Version | Changes | | Version | Changes |
| --------- | ------------------------------------------------------------------------ | | --------- | ------------------------------------------------------------ |
| `v14.1.0` | Renamed `cacheHandler` is stable. | | `v14.1.0` | Renamed to `cacheHandler` and became stable. |
| `v13.4.0` | `incrementalCacheHandlerPath` (experimental) supports `revalidateTag`. | | `v13.4.0` | `incrementalCacheHandlerPath` support for `revalidateTag`. |
| `v13.4.0` | `incrementalCacheHandlerPath` (experimental) supports standalone output. | | `v13.4.0` | `incrementalCacheHandlerPath` support for standalone output. |
| `v12.2.0` | `incrementalCacheHandlerPath` (experimental) is added. | | `v12.2.0` | Experimental `incrementalCacheHandlerPath` added. |
...@@ -97,6 +97,8 @@ module.exports = (phase, { defaultConfig }) => { ...@@ -97,6 +97,8 @@ module.exports = (phase, { defaultConfig }) => {
## TypeScript ## TypeScript
> This feature is available from Next.js canary.
If you are using TypeScript in your project, you can use [`next.config.ts`](/docs/app/building-your-application/configuring/typescript#type-checking-nextconfigts) to use TypeScript in your configuration: If you are using TypeScript in your project, you can use [`next.config.ts`](/docs/app/building-your-application/configuring/typescript#type-checking-nextconfigts) to use TypeScript in your configuration:
```ts filename="next.config.ts" ```ts filename="next.config.ts"
......
--- ---
title: mdxRs (experimental) title: mdxRs
description: Use the new Rust compiler to compile MDX files in the App Router. description: Use the new Rust compiler to compile MDX files in the App Router.
version: experimental.
--- ---
> **Warning**: The `mdxRs` configuration is an experimental feature. This configuration strategy will likely change in the future.
For experimental use with `@next/mdx`. Compiles MDX files using the new Rust compiler. For experimental use with `@next/mdx`. Compiles MDX files using the new Rust compiler.
```js filename="next.config.js" ```js filename="next.config.js"
......
--- ---
title: Partial Prerendering title: ppr
nav_title: ppr (experimental) description: Learn how to enable Partial Prerendering in Next.js.
description: Learn how to enable Partial Prerendering (experimental) in Next.js. version: experimental
related: related:
title: Learn more about Partial Prerendering title: Learn more about Partial Prerendering
links: links:
...@@ -10,8 +10,6 @@ related: ...@@ -10,8 +10,6 @@ related:
Partial Prerendering (PPR) enables you to combine static and dynamic components together in the same route. Learn more about [PPR](/docs/app/building-your-application/rendering/partial-prerendering). Partial Prerendering (PPR) enables you to combine static and dynamic components together in the same route. Learn more about [PPR](/docs/app/building-your-application/rendering/partial-prerendering).
> **Note:** Partial Prerendering is an **experimental** feature and subject to change. It is not ready for production use.
## Using Partial Prerendering ## Using Partial Prerendering
### Incremental Adoption (Version 15) ### Incremental Adoption (Version 15)
...@@ -109,3 +107,8 @@ const nextConfig = { ...@@ -109,3 +107,8 @@ const nextConfig = {
module.exports = nextConfig module.exports = nextConfig
``` ```
| Version | Changes |
| --------- | ------------------------------ |
| `v15.0.0` | `incremental` value introduced |
| `v14.0.0` | experimental `ppr` introduced |
--- ---
title: reactCompiler (experimental) title: reactCompiler
description: Enable the React Compiler to automatically optimize component rendering. description: Enable the React Compiler to automatically optimize component rendering.
version: RC
--- ---
> This feature is **experimental** and may change in future releases. Next.js 15 RC introduced support for the [React Compiler](https://react.dev/learn/react-compiler). The compiler improves performance by automatically optimizing component rendering. This reduces the amount of manual memoization developers have to do through APIs such as `useMemo` and `useCallback`.
Next.js 15 introduced experimental support for the [React Compiler](https://react.dev/learn/react-compiler). The compiler improves performance by automatically optimizing component rendering. This reduces the amount of manual memoization developers have to do through APIs such as `useMemo` and `useCallback`.
To use it, upgrade to Next.js 15, install the `babel-plugin-react-compiler`: To use it, upgrade to Next.js 15, install the `babel-plugin-react-compiler`:
......
--- ---
title: severComponentsHmrCache title: severComponentsHmrCache
description: Configure whether fetch responses in Server Components are cached across HMR refresh requests. description: Configure whether fetch responses in Server Components are cached across HMR refresh requests.
version: RC
--- ---
The experimental `serverComponentsHmrCache` option allows you to cache `fetch` responses in Server Components across Hot Module Replacement (HMR) refreshes in local development. This results in faster responses and reduced costs for billed API calls. The experimental `serverComponentsHmrCache` option allows you to cache `fetch` responses in Server Components across Hot Module Replacement (HMR) refreshes in local development. This results in faster responses and reduced costs for billed API calls.
......
--- ---
title: staleTimes (experimental) title: staleTimes
description: Learn how to override the invalidation time of the Client Router Cache. description: Learn how to override the invalidation time of the Client Router Cache.
version: experimental
--- ---
> **Warning**: The `staleTimes` configuration is an experimental feature. This configuration strategy will likely change in the future.
`staleTimes` is an experimental feature that enables caching of page segments in the [client-side router cache](/docs/app/building-your-application/caching#client-side-router-cache). `staleTimes` is an experimental feature that enables caching of page segments in the [client-side router cache](/docs/app/building-your-application/caching#client-side-router-cache).
You can enable this experimental feature and provide custom revalidation times by setting the experimental `staleTimes` flag: You can enable this experimental feature and provide custom revalidation times by setting the experimental `staleTimes` flag:
...@@ -42,5 +41,5 @@ You can learn more about the Client Router Cache [here](/docs/app/building-your- ...@@ -42,5 +41,5 @@ You can learn more about the Client Router Cache [here](/docs/app/building-your-
| Version | Changes | | Version | Changes |
| --------- | ------------------------------------------------------ | | --------- | ------------------------------------------------------ |
| `v15.0.0` | The "dynamic" staleTime default changed from 30s to 0s | | `v15.0.0` | The `dynamic` staleTime default changed from 30s to 0s |
| `v14.2.0` | experimental `staleTimes` introduced | | `v14.2.0` | experimental `staleTimes` introduced |
--- ---
title: turbo (experimental) title: turbo
nav_title: turbo
description: Configure Next.js with Turbopack-specific options description: Configure Next.js with Turbopack-specific options
version: experimental
--- ---
{/* The content of this doc is shared between the app and pages router. You can use the `<PagesOnly>Content</PagesOnly>` component to add content that is specific to the Pages Router. Any shared content should not be wrapped in a component. */} {/* The content of this doc is shared between the app and pages router. You can use the `<PagesOnly>Content</PagesOnly>` component to add content that is specific to the Pages Router. Any shared content should not be wrapped in a component. */}
......
--- ---
title: typedRoutes (experimental) title: typedRoutes
nav_title: typedRoutes
description: Enable experimental support for statically typed links. description: Enable experimental support for statically typed links.
version: experimental
--- ---
Experimental support for [statically typed links](/docs/app/building-your-application/configuring/typescript#statically-typed-links). This feature requires using the App Router as well as TypeScript in your project. Experimental support for [statically typed links](/docs/app/building-your-application/configuring/typescript#statically-typed-links). This feature requires using the App Router as well as TypeScript in your project.
......
--- ---
title: urlImports title: urlImports
description: Configure Next.js to allow importing modules from external URLs (experimental). description: Configure Next.js to allow importing modules from external URLs.
version: experimental
--- ---
{/* The content of this doc is shared between the app and pages router. You can use the `<PagesOnly>Content</PagesOnly>` component to add content that is specific to the Pages Router. Any shared content should not be wrapped in a component. */} {/* The content of this doc is shared between the app and pages router. You can use the `<PagesOnly>Content</PagesOnly>` component to add content that is specific to the Pages Router. Any shared content should not be wrapped in a component. */}
URL imports are an experimental feature that allows you to import modules directly from external servers (instead of from the local disk). URL imports are an experimental feature that allows you to import modules directly from external servers (instead of from the local disk).
> **Warning**: This feature is experimental. Only use domains that you trust to download and execute on your machine. Please exercise > **Warning**: Only use domains that you trust to download and execute on your machine. Please exercise discretion, and caution until the feature is flagged as stable.
> discretion, and caution until the feature is flagged as stable.
To opt-in, add the allowed URL prefixes inside `next.config.js`: To opt-in, add the allowed URL prefixes inside `next.config.js`:
......
--- ---
title: turbo (experimental) title: turbo
nav_title: turbo
description: Configure Next.js with Turbopack-specific options description: Configure Next.js with Turbopack-specific options
version: experimental
source: app/api-reference/next-config-js/turbo source: app/api-reference/next-config-js/turbo
--- ---
......
--- ---
title: urlImports title: urlImports
description: Configure Next.js to allow importing modules from external URLs (experimental). description: Configure Next.js to allow importing modules from external URLs.
version: experimental
source: app/api-reference/next-config-js/urlImports source: app/api-reference/next-config-js/urlImports
--- ---
......
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