Looked through all `params.` and `searchParams.` accesses. Remaining
ones are either from Pages Router, not actual `params`, OG images (still
sync params) or migration docs.
`headers()` and `cookies()` were all working.
## What?
Updates the draft mode documentation to fix incorrect method calls in
the code examples.
## Why?
The code examples were showing incorrect syntax for enabling and
disabling draft mode, using `draft()` instead of accessing the methods
directly on the `draft` object.
## How?
Removes the unnecessary parentheses when calling `enable()` and
`disable()` methods on the draft mode object in the documentation
examples.
Fixes https://github.com/vercel/feedback/issues/82345
### What
Display `global-error.js` along with error overlay in development. When
a runtime error occurred, you should be able to view the
`global-error.js` content by just hiding the error overlay.
### Why
Current behavior of `global-error.js` confused a lot of users that it
only renders in production build, howerver in dev it's always shows the
error overlay. This was considered "expected" before as you should focus
on fixing error in dev. But this brings a lot of inconvenience for
users, since they can't view the `global-error.js` easily in development
but production build.
#### After
The global-error content is displayed in the html with error overlay
covered

#### Before
Notice nothing displayed

Fixes#55462Fixes#52993
Closes NDX-694
Intercepting routes are built on top of
[rewrites](https://nextjs.org/docs/app/api-reference/config/next-config-js/rewrites)
which is one of the listed [unsupported
features](https://nextjs.org/docs/app/building-your-application/deploying/static-exports#unsupported-features)
of `output: "export"`.
However, because the Next.js server injects the interception routes,
it's not caught by existing validation logic in the export flow.
This properly documents that intercepting routes are not currently
supported by `output: "export"` and hard errors in next dev/build if
detected. Previously route interception would just not have worked,
instead serving the non-intercepted page when built, leading to a
confusing experience.
We eventually want to support this with improved SPA/export features,
however that's out of scope for this PR: the goal here is to ensure
we're providing more immediate feedback about the fact that this is
unsupported.
### What?
During development I noticed that example of custom CacheHandler
contains expression that works only in TypeScript but the file is
declared as JS.
### Why?
To improve documentation DX, so other developers won't be surprised that
code they copied from official docs is not correct semantically.
### How?
Added small fix removing public accessor
This will fix a small bug in one of the examples in the Getting Started
docs. The examples declares a variable that's already declared in the
props which would result in an error when running this.
## Why?
This [PR](https://github.com/vercel/next.js/pull/67351) de-coupled functionality between the Next.js-provided `priority` property and the native `<img>`-provided `fetchPriority` property.
We need to update the documentation to reflect this.
### Improving Documentation
I was just upgrading from Next.js v13 to v14 following this guide:
https://nextjs.org/docs/app/building-your-application/upgrading/version-14
npm installation throws the below error:
```sh
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: blog@0.0.8
npm error Found: react@19.0.0
npm error node_modules/react
npm error react@"19.0.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@"^18.2.0" from next@14.2.21
npm error node_modules/next
npm error next@"14.2.21" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
```
The react version for Next.js v14 should be pinned to react@18.
This PR adds support for `images.qualities` configuration which is an
allowlist of qualities that can be used with the quality prop on the
Image component.
- Depends on https://github.com/vercel/vercel/pull/12792
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>
This PR updates the `use` hook example in the Fetching Data and
Streaming section by adding missing TypeScript types for the `posts`
prop.
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Hi Team.
This PR enhances the Generate Static Pararms documentation by adding
TypeScript examples, and adding missing jsx switcher code blocks, which
previously caused some content to disappear when switching to JavaScript
due to the absence of corresponding jsx examples.
Co-authored-by: JJ Kasper <jj@jjsweb.site>