Skip to content

Commit adb2829

Browse files
nextjs-boteps1lon
andauthored
Upgrade React from c7862584-20251006 to a4eb2dfa-20251006 (#84589)
Co-authored-by: Sebastian Sebbie Silbermann <[email protected]>
1 parent 21f72d3 commit adb2829

File tree

94 files changed

+16920
-6203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+16920
-6203
lines changed

crates/next-core/src/next_config.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,6 @@ pub struct ExperimentalConfig {
864864
trust_host_header: Option<bool>,
865865

866866
url_imports: Option<serde_json::Value>,
867-
view_transition: Option<bool>,
868867
/// This option is to enable running the Webpack build in a worker thread
869868
/// (doesn't apply to Turbopack).
870869
webpack_build_worker: Option<bool>,
@@ -1722,11 +1721,6 @@ impl NextConfig {
17221721
Vc::cell(self.experimental.taint.unwrap_or(false))
17231722
}
17241723

1725-
#[turbo_tasks::function]
1726-
pub fn enable_view_transition(&self) -> Vc<bool> {
1727-
Vc::cell(self.experimental.view_transition.unwrap_or(false))
1728-
}
1729-
17301724
#[turbo_tasks::function]
17311725
pub fn enable_cache_components(&self) -> Vc<bool> {
17321726
Vc::cell(self.experimental.cache_components.unwrap_or(false))

crates/next-core/src/next_import_map.rs

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,13 @@ pub async fn get_next_client_import_map(
127127
match &ty {
128128
ClientContextType::Pages { .. } => {}
129129
ClientContextType::App { app_dir } => {
130-
let react_flavor = if *next_config.enable_ppr().await?
131-
|| *next_config.enable_taint().await?
132-
|| *next_config.enable_view_transition().await?
133-
{
134-
"-experimental"
135-
} else {
136-
""
137-
};
130+
// Keep in sync with file:///./../../../packages/next/src/lib/needs-experimental-react.ts
131+
let react_flavor =
132+
if *next_config.enable_ppr().await? || *next_config.enable_taint().await? {
133+
"-experimental"
134+
} else {
135+
""
136+
};
138137

139138
import_map.insert_exact_alias(
140139
rcstr!("react"),
@@ -833,12 +832,7 @@ async fn apply_vendored_react_aliases_server(
833832
) -> Result<()> {
834833
let ppr = *next_config.enable_ppr().await?;
835834
let taint = *next_config.enable_taint().await?;
836-
let view_transition = *next_config.enable_view_transition().await?;
837-
let react_channel = if ppr || taint || view_transition {
838-
"-experimental"
839-
} else {
840-
""
841-
};
835+
let react_channel = if ppr || taint { "-experimental" } else { "" };
842836
let react_condition = if ty.should_use_react_server_condition() {
843837
"server"
844838
} else {

docs/01-app/03-api-reference/05-config/01-next-config-js/viewTransition.mdx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Enable ViewTransition API from React in App Router
44
version: experimental
55
---
66

7-
`viewTransition` is an experimental flag that enables the new experimental [View Transitions API](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API) in React. This API allows you to leverage the native View Transitions browser API to create seamless transitions between UI states.
7+
`viewTransition` is an experimental flag that enables the new [View Transitions API](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API) in React. This API allows you to leverage the native View Transitions browser API to create seamless transitions between UI states.
88

99
To enable this feature, you need to set the `viewTransition` property to `true` in your `next.config.js` file.
1010

@@ -19,19 +19,18 @@ const nextConfig = {
1919
module.exports = nextConfig
2020
```
2121

22-
> Important Notice: This feature is not developed or maintained by the Next.js team — it is an experimental API from the React team. It is still in **early stages** and **not recommended for production use**. The implementation is still being iterated on, and its behavior may change in future React releases.
23-
> Enabling this feature requires understanding the experimental nature of the API. To fully grasp its behavior, refer to the [React pull request](https://github.com/facebook/react/pull/31975) and related discussions.
22+
> Important Notice: The `<ViewTransition>` Component is already available in React's Canary release channel.
23+
> `experimental.viewTransition` is only required to enable deeper integration with Next.js features e.g. automatically
24+
> [adding Transition types](https://react.dev/reference/react/addTransitionType) for navigations. Next.js specific transition types are not implemented yet.
2425
2526
## Usage
2627

27-
Once enabled, you can import the `ViewTransition` component from React in your application:
28+
You can import the [`<ViewTransition>` Component](https://react.dev/reference/react/ViewTransition) from React in your application:
2829

2930
```jsx
30-
import { unstable_ViewTransition as ViewTransition } from 'react'
31+
import { ViewTransition } from 'react'
3132
```
3233

33-
However, documentation and examples are currently limited, and you will need to refer directly to React’s source code and discussions to understand how this works.
34-
3534
### Live Demo
3635

3736
Check out our [Next.js View Transition Demo](https://view-transition-example.vercel.app) to see this feature in action.

package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@
163163
"@types/jest": "29.5.5",
164164
"@types/node": "20.17.6",
165165
"@types/node-fetch": "2.6.1",
166-
"@types/react": "19.1.16",
167-
"@types/react-dom": "19.1.10",
166+
"@types/react": "19.2.2",
167+
"@types/react-dom": "19.2.1",
168168
"@types/relay-runtime": "14.1.13",
169169
"@types/string-hash": "1.1.1",
170170
"@types/trusted-types": "2.0.3",
@@ -199,7 +199,7 @@
199199
"eslint-plugin-jsdoc": "48.0.4",
200200
"eslint-plugin-mdx": "3.1.5",
201201
"eslint-plugin-react": "7.35.0",
202-
"eslint-plugin-react-hooks": "0.0.0-experimental-c7862584-20251006",
202+
"eslint-plugin-react-hooks": "0.0.0-experimental-a4eb2dfa-20251006",
203203
"eslint-v8": "npm:eslint@^8.57.0",
204204
"event-stream": "4.0.1",
205205
"execa": "2.0.3",
@@ -259,16 +259,16 @@
259259
"pretty-ms": "7.0.0",
260260
"random-seed": "0.3.0",
261261
"react": "19.0.0",
262-
"react-builtin": "npm:[email protected]c7862584-20251006",
262+
"react-builtin": "npm:[email protected]a4eb2dfa-20251006",
263263
"react-dom": "19.0.0",
264-
"react-dom-builtin": "npm:[email protected]c7862584-20251006",
265-
"react-dom-experimental-builtin": "npm:[email protected]c7862584-20251006",
266-
"react-experimental-builtin": "npm:[email protected]c7862584-20251006",
267-
"react-is-builtin": "npm:[email protected]c7862584-20251006",
268-
"react-server-dom-turbopack": "19.3.0-canary-c7862584-20251006",
269-
"react-server-dom-turbopack-experimental": "npm:[email protected]c7862584-20251006",
270-
"react-server-dom-webpack": "19.3.0-canary-c7862584-20251006",
271-
"react-server-dom-webpack-experimental": "npm:[email protected]c7862584-20251006",
264+
"react-dom-builtin": "npm:[email protected]a4eb2dfa-20251006",
265+
"react-dom-experimental-builtin": "npm:[email protected]a4eb2dfa-20251006",
266+
"react-experimental-builtin": "npm:[email protected]a4eb2dfa-20251006",
267+
"react-is-builtin": "npm:[email protected]a4eb2dfa-20251006",
268+
"react-server-dom-turbopack": "19.3.0-canary-a4eb2dfa-20251006",
269+
"react-server-dom-turbopack-experimental": "npm:[email protected]a4eb2dfa-20251006",
270+
"react-server-dom-webpack": "19.3.0-canary-a4eb2dfa-20251006",
271+
"react-server-dom-webpack-experimental": "npm:[email protected]a4eb2dfa-20251006",
272272
"react-ssr-prepass": "1.0.8",
273273
"react-virtualized": "9.22.3",
274274
"relay-compiler": "13.0.2",
@@ -278,8 +278,8 @@
278278
"resolve-from": "5.0.0",
279279
"sass": "1.54.0",
280280
"satori": "0.15.2",
281-
"scheduler-builtin": "npm:[email protected]c7862584-20251006",
282-
"scheduler-experimental-builtin": "npm:[email protected]c7862584-20251006",
281+
"scheduler-builtin": "npm:[email protected]a4eb2dfa-20251006",
282+
"scheduler-experimental-builtin": "npm:[email protected]a4eb2dfa-20251006",
283283
"seedrandom": "3.0.5",
284284
"semver": "7.3.7",
285285
"serve-handler": "6.1.6",
@@ -319,14 +319,14 @@
319319
"@babel/parser": "7.27.0",
320320
"@babel/types": "7.27.0",
321321
"@babel/traverse": "7.27.0",
322-
"@types/react": "19.1.16",
323-
"@types/react-dom": "19.1.10",
322+
"@types/react": "19.2.2",
323+
"@types/react-dom": "19.2.1",
324324
"@types/retry": "0.12.0",
325325
"jest-snapshot": "30.0.0-alpha.6",
326-
"react": "19.3.0-canary-c7862584-20251006",
327-
"react-dom": "19.3.0-canary-c7862584-20251006",
328-
"react-is": "19.3.0-canary-c7862584-20251006",
329-
"scheduler": "0.28.0-canary-c7862584-20251006"
326+
"react": "19.3.0-canary-a4eb2dfa-20251006",
327+
"react-dom": "19.3.0-canary-a4eb2dfa-20251006",
328+
"react-is": "19.3.0-canary-a4eb2dfa-20251006",
329+
"scheduler": "0.28.0-canary-a4eb2dfa-20251006"
330330
},
331331
"packageExtensions": {
332332

packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31872,12 +31872,10 @@
3187231872
? parentHostFiber
3187331873
: Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC;
3187431874
};
31875-
FragmentInstance.prototype.experimental_scrollIntoView = function (
31876-
alignToTop
31877-
) {
31875+
FragmentInstance.prototype.scrollIntoView = function (alignToTop) {
3187831876
if ("object" === typeof alignToTop)
3187931877
throw Error(
31880-
"FragmentInstance.experimental_scrollIntoView() does not support scrollIntoViewOptions. Use the alignToTop boolean instead."
31878+
"FragmentInstance.scrollIntoView() does not support scrollIntoViewOptions. Use the alignToTop boolean instead."
3188131879
);
3188231880
var children = [];
3188331881
traverseVisibleHostChildren(
@@ -32342,11 +32340,11 @@
3234232340
};
3234332341
(function () {
3234432342
var isomorphicReactPackageVersion = React.version;
32345-
if ("19.3.0-experimental-c7862584-20251006" !== isomorphicReactPackageVersion)
32343+
if ("19.3.0-experimental-a4eb2dfa-20251006" !== isomorphicReactPackageVersion)
3234632344
throw Error(
3234732345
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
3234832346
(isomorphicReactPackageVersion +
32349-
"\n - react-dom: 19.3.0-experimental-c7862584-20251006\nLearn more: https://react.dev/warnings/version-mismatch")
32347+
"\n - react-dom: 19.3.0-experimental-a4eb2dfa-20251006\nLearn more: https://react.dev/warnings/version-mismatch")
3235032348
);
3235132349
})();
3235232350
("function" === typeof Map &&
@@ -32383,10 +32381,10 @@
3238332381
!(function () {
3238432382
var internals = {
3238532383
bundleType: 1,
32386-
version: "19.3.0-experimental-c7862584-20251006",
32384+
version: "19.3.0-experimental-a4eb2dfa-20251006",
3238732385
rendererPackageName: "react-dom",
3238832386
currentDispatcherRef: ReactSharedInternals,
32389-
reconcilerVersion: "19.3.0-experimental-c7862584-20251006"
32387+
reconcilerVersion: "19.3.0-experimental-a4eb2dfa-20251006"
3239032388
};
3239132389
internals.overrideHookState = overrideHookState;
3239232390
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -32534,7 +32532,7 @@
3253432532
listenToAllSupportedEvents(container);
3253532533
return new ReactDOMHydrationRoot(initialChildren);
3253632534
};
32537-
exports.version = "19.3.0-experimental-c7862584-20251006";
32535+
exports.version = "19.3.0-experimental-a4eb2dfa-20251006";
3253832536
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
3253932537
"function" ===
3254032538
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17674,7 +17674,7 @@ function validateDocumentPositionWithFiberTree(
1767417674
fragmentFiber)
1767517675
: !1;
1767617676
}
17677-
FragmentInstance.prototype.experimental_scrollIntoView = function (alignToTop) {
17677+
FragmentInstance.prototype.scrollIntoView = function (alignToTop) {
1767817678
if ("object" === typeof alignToTop) throw Error(formatProdErrorMessage(566));
1767917679
var children = [];
1768017680
traverseVisibleHostChildren(
@@ -19570,14 +19570,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1957019570
};
1957119571
var isomorphicReactPackageVersion$jscomp$inline_2217 = React.version;
1957219572
if (
19573-
"19.3.0-experimental-c7862584-20251006" !==
19573+
"19.3.0-experimental-a4eb2dfa-20251006" !==
1957419574
isomorphicReactPackageVersion$jscomp$inline_2217
1957519575
)
1957619576
throw Error(
1957719577
formatProdErrorMessage(
1957819578
527,
1957919579
isomorphicReactPackageVersion$jscomp$inline_2217,
19580-
"19.3.0-experimental-c7862584-20251006"
19580+
"19.3.0-experimental-a4eb2dfa-20251006"
1958119581
)
1958219582
);
1958319583
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19599,10 +19599,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1959919599
};
1960019600
var internals$jscomp$inline_2914 = {
1960119601
bundleType: 0,
19602-
version: "19.3.0-experimental-c7862584-20251006",
19602+
version: "19.3.0-experimental-a4eb2dfa-20251006",
1960319603
rendererPackageName: "react-dom",
1960419604
currentDispatcherRef: ReactSharedInternals,
19605-
reconcilerVersion: "19.3.0-experimental-c7862584-20251006"
19605+
reconcilerVersion: "19.3.0-experimental-a4eb2dfa-20251006"
1960619606
};
1960719607
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1960819608
var hook$jscomp$inline_2915 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -19709,4 +19709,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1970919709
listenToAllSupportedEvents(container);
1971019710
return new ReactDOMHydrationRoot(initialChildren);
1971119711
};
19712-
exports.version = "19.3.0-experimental-c7862584-20251006";
19712+
exports.version = "19.3.0-experimental-a4eb2dfa-20251006";

packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31924,12 +31924,10 @@
3192431924
? parentHostFiber
3192531925
: Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC;
3192631926
};
31927-
FragmentInstance.prototype.experimental_scrollIntoView = function (
31928-
alignToTop
31929-
) {
31927+
FragmentInstance.prototype.scrollIntoView = function (alignToTop) {
3193031928
if ("object" === typeof alignToTop)
3193131929
throw Error(
31932-
"FragmentInstance.experimental_scrollIntoView() does not support scrollIntoViewOptions. Use the alignToTop boolean instead."
31930+
"FragmentInstance.scrollIntoView() does not support scrollIntoViewOptions. Use the alignToTop boolean instead."
3193331931
);
3193431932
var children = [];
3193531933
traverseVisibleHostChildren(
@@ -32394,11 +32392,11 @@
3239432392
};
3239532393
(function () {
3239632394
var isomorphicReactPackageVersion = React.version;
32397-
if ("19.3.0-experimental-c7862584-20251006" !== isomorphicReactPackageVersion)
32395+
if ("19.3.0-experimental-a4eb2dfa-20251006" !== isomorphicReactPackageVersion)
3239832396
throw Error(
3239932397
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
3240032398
(isomorphicReactPackageVersion +
32401-
"\n - react-dom: 19.3.0-experimental-c7862584-20251006\nLearn more: https://react.dev/warnings/version-mismatch")
32399+
"\n - react-dom: 19.3.0-experimental-a4eb2dfa-20251006\nLearn more: https://react.dev/warnings/version-mismatch")
3240232400
);
3240332401
})();
3240432402
("function" === typeof Map &&
@@ -32435,10 +32433,10 @@
3243532433
!(function () {
3243632434
var internals = {
3243732435
bundleType: 1,
32438-
version: "19.3.0-experimental-c7862584-20251006",
32436+
version: "19.3.0-experimental-a4eb2dfa-20251006",
3243932437
rendererPackageName: "react-dom",
3244032438
currentDispatcherRef: ReactSharedInternals,
32441-
reconcilerVersion: "19.3.0-experimental-c7862584-20251006"
32439+
reconcilerVersion: "19.3.0-experimental-a4eb2dfa-20251006"
3244232440
};
3244332441
internals.overrideHookState = overrideHookState;
3244432442
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -32916,7 +32914,7 @@
3291632914
exports.useFormStatus = function () {
3291732915
return resolveDispatcher().useHostTransitionStatus();
3291832916
};
32919-
exports.version = "19.3.0-experimental-c7862584-20251006";
32917+
exports.version = "19.3.0-experimental-a4eb2dfa-20251006";
3292032918
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
3292132919
"function" ===
3292232920
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19711,7 +19711,7 @@ function validateDocumentPositionWithFiberTree(
1971119711
fragmentFiber)
1971219712
: !1;
1971319713
}
19714-
FragmentInstance.prototype.experimental_scrollIntoView = function (alignToTop) {
19714+
FragmentInstance.prototype.scrollIntoView = function (alignToTop) {
1971519715
if ("object" === typeof alignToTop) throw Error(formatProdErrorMessage(566));
1971619716
var children = [];
1971719717
traverseVisibleHostChildren(
@@ -21624,14 +21624,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
2162421624
};
2162521625
var isomorphicReactPackageVersion$jscomp$inline_2513 = React.version;
2162621626
if (
21627-
"19.3.0-experimental-c7862584-20251006" !==
21627+
"19.3.0-experimental-a4eb2dfa-20251006" !==
2162821628
isomorphicReactPackageVersion$jscomp$inline_2513
2162921629
)
2163021630
throw Error(
2163121631
formatProdErrorMessage(
2163221632
527,
2163321633
isomorphicReactPackageVersion$jscomp$inline_2513,
21634-
"19.3.0-experimental-c7862584-20251006"
21634+
"19.3.0-experimental-a4eb2dfa-20251006"
2163521635
)
2163621636
);
2163721637
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -21653,10 +21653,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
2165321653
};
2165421654
var internals$jscomp$inline_3223 = {
2165521655
bundleType: 0,
21656-
version: "19.3.0-experimental-c7862584-20251006",
21656+
version: "19.3.0-experimental-a4eb2dfa-20251006",
2165721657
rendererPackageName: "react-dom",
2165821658
currentDispatcherRef: ReactSharedInternals,
21659-
reconcilerVersion: "19.3.0-experimental-c7862584-20251006"
21659+
reconcilerVersion: "19.3.0-experimental-a4eb2dfa-20251006"
2166021660
};
2166121661
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
2166221662
var hook$jscomp$inline_3224 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -21924,7 +21924,7 @@ exports.useFormState = function (action, initialState, permalink) {
2192421924
exports.useFormStatus = function () {
2192521925
return ReactSharedInternals.H.useHostTransitionStatus();
2192621926
};
21927-
exports.version = "19.3.0-experimental-c7862584-20251006";
21927+
exports.version = "19.3.0-experimental-a4eb2dfa-20251006";
2192821928
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2192921929
"function" ===
2193021930
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10544,5 +10544,5 @@
1054410544
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
1054510545
);
1054610546
};
10547-
exports.version = "19.3.0-experimental-c7862584-20251006";
10547+
exports.version = "19.3.0-experimental-a4eb2dfa-20251006";
1054810548
})();

packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7157,4 +7157,4 @@ exports.renderToString = function (children, options) {
71577157
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
71587158
);
71597159
};
7160-
exports.version = "19.3.0-experimental-c7862584-20251006";
7160+
exports.version = "19.3.0-experimental-a4eb2dfa-20251006";

0 commit comments

Comments
 (0)