Commit Graph

1072 Commits

Author SHA1 Message Date
Sayakie 355831afbd docs: fix typo in docs (#82186)
### What?
This pull request just fix typo in documentation.

---------

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-07-30 12:03:04 +02:00
M. Abdullah ad4fd37d37 docs: update cacheTag.mdx (#82051)
## Improving Documentation

Updated the doc to reflect the API signature of `cacheTag`, which takes
one or more string values.

---------

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-07-30 09:42:13 +02:00
Wes 9c5fa27c68 docs: change Dashboard component to async for session verification (#81880)
## Improving Documentation

Updated the `Dashboard` component to be an `async` function to properly
`await` the session verification process. This change ensures that the
user role is retrieved correctly from `session` before rendering the
component.

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-07-29 23:45:37 +02:00
Remco Haszing 42bcacd9a1 Remove useMDXComponents argument (#80871)
### What?

Fix the signatures of `useMDXComponents`.

### Why?

The `useMDXComponents` function is always called without any arguments.
It’s also always supposed to be a named export, not a default export.
It’s also called during render. Defining React components during render
is an anti-pattern. All components that were previously defined inside
of `useMDXComponents`, are now defined outside of the function.

### How?

Manual fixes.

---------

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Joseph <sephxd1234@gmail.com>
Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-07-29 22:45:08 +02:00
Joseph 10e0798fc9 docs: cookies.set encode option is not supported (#82154)
Encode overriding is not supported by the upstream library.
2025-07-29 22:40:39 +02:00
Joseph 14c5d67328 docs: Update styling example links (#82111)
Fixes: https://github.com/vercel/next.js/issues/82098
2025-07-28 13:00:04 +02:00
Allen Zhou d5f6c11ab0 [docs] fix rewrites example wording (#81985)
This PR fixes a small grammatical error in the Next.js rewrites
documentation.

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2025-07-23 20:51:11 +00:00
Delba de Oliveira 4e96d7d1ad Docs: Document global-not-found (#81803)
Closes:
https://linear.app/vercel/issue/DOC-4873/document-global-not-found

---------

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Jiachi Liu <inbox@huozhi.im>
2025-07-22 10:19:49 +00:00
JJ Kasper dd9e43e56c Stabilize node middleware support (#81907)
As mentioned in our last blog post we are going to be stabilizing node
middleware now so this removes the experimental flag canary gating the
feature.
2025-07-21 16:22:15 -07:00
Rudolph Gottesheim 5e46e37203 Remove some random commas (#81875)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2025-07-21 12:53:01 -07:00
Wyatt Johnson 8abbb3dc2e refactor: rename experimental.dynamicIO to experimental.cacheComponents (#81562)
## What?

Rename `experimental.dynamicIO` to `experimental.cacheComponents` across
the Next.js codebase.

## Why?

We're going to be merging the functionality of the `ppr`, `dynamicIO`
and `useCache` experimental flags into the singular `cacheComponents`
flag to reduce complexity of the codebase and simplify adoption for
users wanting to experiment with experimental features.

## How?

- Renamed the configuration option from `experimental.dynamicIO` to
`experimental.cacheComponents`
- Added deprecation handling with automatic migration for the old option
name
- Updated all documentation, tests, and internal references
- Updated Rust code in SWC transforms and Turbopack
- Maintained backward compatibility with deprecation warnings

NAR-158
2025-07-17 19:30:28 -06:00
Tim Neutkens 115eff7201 Turbopack: Support string without options for @next/mdx (#81713)
## What?

Adds support for `remarkPlugins: ['remark-gfm']` and `rehypePlugins:
['rehype-slug']`.

Previously you had to nest an array like `remarkPlugins:
[['remark-gfm']]` but that's a bug, that case is only for passing
options. Directly passing the string without options should be allowed.
This PR implements that.
2025-07-16 17:05:23 +02:00
Prateek Choudhary 386afcd423 docs: Update redirects i18n documentation for App Router (#81347)
### What?
Updated the documentation to clarify that App Router requires manual
locale handling through dynamic route segments and middleware, with
examples showing how to implement i18n redirects correctly.

### Why?
The App Router doesn't use the i18n configuration in next.config.js like
the Pages Router does.

Closes NEXT-
Fixes #81227

---------

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
Co-authored-by: Joseph <sephxd1234@gmail.com>
2025-07-16 09:22:07 +02:00
Joseph 1758c3c442 docs: onInvalidate router.prefetch (#81609)
Closes:
[DOC-4741](https://linear.app/vercel/issue/DOC-4741/document-oninvalidate-for-userouter-hook)
2025-07-14 18:56:33 +02:00
Delba de Oliveira fcfae6eba0 15.4 Docs: Minor feature updates (#81618)
Updates the docs to include the new options in 15.4. 

- `prefetch="auto"` option: https://github.com/vercel/next.js/pull/78689
- `next build` new `--debug-prerender option`:
https://github.com/vercel/next.js/pull/80667

---------

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
2025-07-14 17:33:22 +01:00
Nazar fcadb6846e docs: update Page example to use Promise-based params in 05-server-and-client-components.mdx (#81557)
What?
This PR updates the Page component example in
05-server-and-client-components.mdx to use Promise-based params as
recommended in the Next.js 15 documentation.

Why?
Next.js 15 introduced support for async props, allowing the params prop
to be a Promise in Server Components. Updating the documentation ensures
that users follow the latest recommended practices and avoid confusion
when working with dynamic routes in Next.js 15.

How?
- Changed the Page component example to accept params as a Promise and
use await params to destructure the id.
- Updated the type annotation accordingly.
2025-07-11 12:40:04 -07:00
Joseph 7560398745 docs: root layout + opengraph-image + cna-eslit vs next lint bootstrap (#81542)
Fixes: https://github.com/vercel/next.js/issues/81529,
https://github.com/vercel/next.js/issues/81352 and
https://github.com/vercel/next.js/issues/78630
2025-07-11 13:27:55 +02:00
Joseph 094253c14c docs: add missing switcher (#81489)
Fixing a couple of code snippets annoyances
2025-07-10 11:18:22 +02:00
Joseph 04f7742329 docs: PPR requires canary (#81294)
Fixes: https://github.com/vercel/next.js/issues/81292
2025-07-10 08:26:37 +02:00
gsmt c10d258482 Add @sparticuz/chromium-min to default server externals (#81309)
This package needs to be externalized to have it's wasm dependencies
traced properly for node runtime so this adds it to the default list.
2025-07-09 14:27:20 -07:00
Rachna Chavan 639c731600 Update image.mdx (#81454)
fix: Input image name and output image name is different and causes
confusion.

---------

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-07-09 11:41:14 -07:00
Kid de7e13e5eb Remove incorrect PostCSS config type (#81338)
### What?

Currently the docs is incorrectly suggesting to type the PostCSS config
with types from Tailwind CSS. This pull request removed the wrong types.

If desired one can correctly type the config with the
[`postcss-load-config`](https://github.com/postcss/postcss-load-config/blob/main/src/index.d.ts#L52-L60)
package:

```js
/** @type {import('postcss-load-config').Config} */
const config = {
    plugins: {
        '@tailwindcss/postcss': {},
    },
}

export default config
```

However if your package manager does not hoist the package, you need to
install it separately just for the types, which does not seem to be
worth it.

### Why?

### How?

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2025-07-05 23:17:10 +00:00
Sajad Torkamani 6ba9c21d29 fix typo (#81336)
<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->
2025-07-05 22:54:02 +00:00
mm c28261568f Update caching.mdx (#81185)
Updating caching guide to be more specific on fetch API. Solves
https://github.com/vercel/next.js/issues/81183

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

---------

Co-authored-by: Joseph <sephxd1234@gmail.com>
Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-07-03 12:45:47 +02:00
Ethan Niser 4551373c97 Docs: include effect in docs for default optimized libraries (#81203)
This PR updates the docs for `optimizePackageImports` default optimized
packages to include `effect` and the `@effect/*` packages

These were added by 9f647f311f 

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-07-03 09:38:48 +00:00
Joseph 82115d6e5e Docs/after function mdx fix (#81174)
The current formatting caused the mdx parser to do `details > p >
summary` - which caused a hydration error for invalid HTML, but also
just rendered `> Details`

<img width="501" alt="Screenshot 2025-07-02 at 10 38 51"
src="https://github.com/user-attachments/assets/61819edc-75bb-4824-a000-71a4dc880905"
/>

After:

<img width="481" alt="Screenshot 2025-07-02 at 10 47 23"
src="https://github.com/user-attachments/assets/d42c2087-ce78-4944-a580-e4630cfa864d"
/>
2025-07-03 10:44:21 +02:00
Joseph fbc988d042 docs: Getting started pages and search params (#80616)
Closes:
https://linear.app/vercel/issue/DOC-4789/getting-started-layout-and-pages-search-params

---------

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2025-07-03 09:07:29 +02:00
Marek Lisy 5efef45226 Update caching.mdx (#81129)
### What?

Fix misleading information in the docs about mixing cached and uncached
`fetch` calls during dynamic rendering.

### Why?

I followed the guide (using Next.js 15.3.2) and tried it out with this
code:
```ts
  const joke = await fetch("https://api.chucknorris.io/jokes/random", {
    cache: "no-cache",
  });
  const jokeData = await joke.json();

  console.log("Fetched joke:", jokeData.value);

  const joke2 = await fetch(
    "https://api.chucknorris.io/jokes/random?category=dev"
  );
  const jokeData2 = await joke2.json();
  console.log("Fetched joke2:", jokeData2.value);
```

After building and starting the production server, when I refresh the
page, both `jokeData.value` and `jokeData2.value` are different,
uncached. If I want the other `fetch` to be cached, I need to explicitly
enable caching, e.g.

```ts
  const joke = await fetch("https://api.chucknorris.io/jokes/random", {
    cache: "no-cache",
  });
  const jokeData = await joke.json();

  console.log("Fetched joke:", jokeData.value);

  const joke2 = await fetch(
    "https://api.chucknorris.io/jokes/random?category=dev",
    {
      cache: "force-cache",
    }
  );
  const jokeData2 = await joke2.json();
  console.log("Fetched joke2:", jokeData2.value);
```

This way the first fetch is not cached while the second one is.

### How?

The previous version claimed:
> Other `fetch` requests that do not opt out of caching will still be
cached in the Data Cache.

But below in the guide, we can see this:
> The default caching behavior of fetch (e.g., when the cache option is
not specified) is equal to setting the cache option to no-store:

So the first citation is misleading - the fetch requests are not cached
by default (with dynamic rendering - static rendering would cache the
single call it into the output), so we actually need to explicitly
enable caching to have them cached.

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-07-02 09:56:02 +02:00
adrian acosta dd374da668 Docs: moved table for Unsupported Metadata to the correct location (#80979)
The table used for Unsupported Metadata was misplaced, so I moved it.

Next.js Docs page:
https://nextjs.org/docs/app/api-reference/functions/generate-metadata#unsupported-metadata

The section for 'Unsupported Metadata':

![Screenshot_26-6-2025_183814_nextjs
org](https://github.com/user-attachments/assets/a265678c-8330-47cd-bf02-93cc23a9c713)

The misplaced table (located a few sections down):

![Screenshot_26-6-2025_183914_nextjs
org](https://github.com/user-attachments/assets/86ea5c75-4bce-4f50-a2e1-aa8af6a01529)

---------

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-07-01 20:56:31 +02:00
Joseph ce553744b5 Docs: paper cuts July 1st (#81109)
Just a couple of adjustments to Caching docs claim that React State is
preserved upon SPA transitions - as of today, without the Activity API,
only shared layouts state is preserved.

And we are saying redirect should be called outside try/catch blocks,
but rather, it is the try block that's the problem. So I am rephrasing
that.

I still think it is best to keep the redirect away from the try/catch
statement altogether.
2025-07-01 13:20:17 +02:00
Exotic 80a580573e docs: fix grammatical error in upgrading to v15 guide (#81038)
Title is pretty self descriptive.

<img width="667" alt="image"
src="https://github.com/user-attachments/assets/211f9eee-5d39-494e-abb9-9cad996b75be"
/>

Removes the word "you" for better grammatical clarity.

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-07-01 10:48:47 +02:00
Joseph 52a761e652 chore: .ts ext is most commonly used for middleware and routes (#81059)
`middleware.ts` and `route.ts` are commonly used
2025-06-30 13:28:48 +02:00
Mohammed 3327565c43 docs(fetch): update wording on conflicting cache and revalidate options (#80591)
Clarifies that using conflicting options such as `{ revalidate: 3600,
cache: 'no-store' }` results in a warning in the terminal rather than an
error.

This change helps accurately reflect the current runtime behavior and
avoids misleading readers into expecting a hard failure.

The update improves developer understanding when configuring fetch/cache
strategies in their applications.

---------

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-06-30 10:12:38 +02:00
Tim Neutkens e0a7a95fb2 Turbopack: @next/mdx extension option is supported (#81058)
## What?

@wbinnssmith added support for this option some time ago.
2025-06-30 09:41:18 +02:00
Luciano Mammino 812596e77e Update backend-for-frontend.mdx (#80942)
Example function in [App Router > Guides > Backend For Frontend > Public
Endpoints](https://nextjs.org/docs/app/guides/backend-for-frontend#public-endpoints)
should be `async` (since using `await`)

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

---------

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-06-26 20:08:22 +02:00
Joseph 166f710c1f Docs/feedback june batch (#80651)
Addressing feedback from:

- missing function reference
https://github.com/vercel/next.js/issues/77190
- Error boundaries: https://github.com/vercel/next.js/issues/42525
- RedirectType: https://github.com/vercel/next.js/issues/59160
- generateMetadata can be included into static builds:
https://github.com/vercel/next.js/issues/80499

Also the headings here,
https://nextjs.org/docs/app/guides/local-development are not properly
nested

---------

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2025-06-26 20:07:53 +02:00
Joseph 7678bb904e docs: link api reference pages/app router divergence (#80955)
This PR https://github.com/vercel/next.js/pull/80922 highlighted an
issue with the Link API reference.

Looking further into it I saw that we had mixed a few `AppOnly` +
`PagesOnly` tags, and needed a few more changes.
2025-06-26 19:01:50 +02:00
Joseph b3e6b5b6e6 Docs/fetching data deduping (#80806)
Fixes: https://github.com/vercel/next.js/issues/77077
https://github.com/vercel/next.js/issues/80790

- We are missing the deduping step that wraps with React.cache
- Add some more clarify about passing cache, current and future renders

Closes: https://linear.app/vercel/issue/DOC-4806/fetching-dedupe

---------

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2025-06-26 16:41:42 +02:00
Joseph 74b7cc339a docs: Add a link to what opts into dynamic rendering (#80910)
Fixes:
https://github.com/vercel/next.js/issues/66871#issuecomment-3005875361

Let's add this patch quickly. I take over the Devin PR - and try to get
it merged in the coming days.
2025-06-26 16:32:02 +02:00
Joseph 28e072705d docs: Use phosphor icons import perf optimization (#80811)
Fixes: https://github.com/vercel/next.js/issues/80800

`react-icons` only supports the pattern we show through
`react-icons/all-files`, which hasn't been updated in the past 5 years.
`react-icons` does group icons by sets, so the recommendation about
sticking to a set is still valid.

I chose `@phosphor-icons/react`, since they also have a section on why
importing only the icon you need is a good idea.
2025-06-26 15:27:31 +01:00
Ben Gubler 8b8057d307 docs: add explanation of --disable-git command (#80882)
The `--disable-git` command was implemented in #68821 (released in
`v15.0.0-canary.119`).

It was documented in create-next-app/README.md, but not in the website.
I've seen several discussions online about the feature (usually from
people who remember an old `--no-git` flag) so this will be nice to
publish.

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2025-06-25 18:46:53 +02:00
JJ Kasper d88e313cf7 Add htmlrewriter to default server externals (#80819)
This package needs to be externalized to have it's wasm dependencies
traced properly for node runtime so this adds it to our default list.

x-ref: [slack
thread](https://vercel.slack.com/archives/C07LQPFERGF/p1750713377659779?thread_ts=1750693981.162239&cid=C07LQPFERGF)
2025-06-23 21:57:34 +00:00
Joseph 5e5a623cb5 chore: Dynamic error does not change dynamicParams (#80796)
Closes:
https://linear.app/vercel/issue/DOC-4725/docs-dynamic-dynamicparams
Fixes: https://github.com/vercel/next.js/issues/80749
2025-06-23 07:50:55 -05:00
Magnus d5410c26a5 docs: add csp and content disposition type (#80735)
Add `contentSecurityPolicy` to Image Component in docs. Also follow up
in on the type in `image-config.ts` to use the updated docs.

---------

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
2025-06-20 18:06:55 -04:00
Nemanja Kostadinovic 693619fddb Docs: Update code snippets in linking and navigating guide (#80652)
This PR updates code snippets in linking and navigating guide in docs.
It also replaces wrong file name in one of the snippets.
2025-06-18 11:42:42 +00:00
Hendrik Liebau 36c4dd475d Docs: Remove reference to deleted experimental turbotrace feature (#80572)
The experimental `turbotrace` feature was removed in #71359, and hasn't
been available since Next.js v15.0.3.
2025-06-18 09:27:28 +02:00
Joseph 4fa1c16809 docs: streaming metadata, dynamic pages and generateMetadata (#80453)
Closes:
https://linear.app/vercel/issue/DOC-4687/docs-streaming-metadata-implications

---------

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2025-06-17 10:45:56 +02:00
dan 7dedc5b19f Explain how to use searchParams prop (#80579)
I think this is a glaring omission from the docs that makes it very
difficult to understand how to use these API right.

See [this discussion on
Reddit](https://www.reddit.com/r/reactjs/comments/1lar2ss/comment/my2e3kl/).

I took a minimal approach but really this should be properly explained
somewhere because nobody knows this prop exists.
2025-06-16 22:27:40 +02:00
Delba de Oliveira 2e2ee08b60 Docs IA 2.0: Delete routing section, add BFF guide, polish getting started (#80365)
Closes:
https://linear.app/vercel/issue/DOC-4686/clean-up-routing-section
Redirects: https://github.com/vercel/front/pull/47151

---------

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
2025-06-16 13:42:20 +01:00
Sajad Torkamani 27fed1c1b6 docs: fix typo (#80501)
<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2025-06-16 11:47:46 +00:00