cloudflare / cloudflare/vinext

Pages Router: warn that React 18 support is deprecated

Open
#3,116 0 comments 0 reactions 0 assignees View on GitHub
nextjs-tracking
Dominant language
TypeScript
Stars
8.8k
Forks
406
Avg merge
2d 6h
Merged PRs (30d)
120

Description

## Next.js Change

**Commit:** [`89d017e`](https://github.com/vercel/next.js/commit/89d017eac43ebf4742ed2b58d3c1373b70283b69)
**PR:** [#97689](https://github.com/vercel/next.js/pull/97689)

## What changed

Next.js 16 now emits a one-time warning during `next dev` and `next build` when either installed `react` or `react-dom` is version 18. The warning explains that React 18 remains supported in Next.js 16, is deprecated, and will be removed in Next.js 17. `next start` remains quiet.

## Impact on vinext

vinext provides development and production build commands for Pages Router applications and should communicate the same React 18 deprecation timeline without warning during production serving.

What to check/do:

1. Resolve the application-installed `react` and `react-dom` versions when starting development or production builds.
2. Emit one warning when either package is React 18, stating that support is deprecated in Next.js 16 and removed in Next.js 17.
3. Do not emit this warning when serving a production build.
4. Add focused coverage for React 18 and React 19 across development, build, and production serving.

## Related

- Upstream React version coverage in `test/e2e/react-current-version/react-current-version.test.ts`

Contributor guide

Open the contributing guide

Research direction

Start with the Pages Router development, build, and production-serving entry points, then read the related test/e2e/react-current-version/react-current-version.test.ts coverage named in the issue. Trace how installed react and react-dom versions are resolved; done means one React 18 warning in development and builds, no warning during production serving, and focused React 18 and React 19 coverage across all three paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, react, typescript, vite
Domain
build-system, testing, web-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.