Skip to content

Commit fe657a1

Browse files
committed
Replace Implicit Options on SuspenseList with Explicit Options (facebook#33424)
We want to change the defaults for `revealOrder` and `tail` on SuspenseList. This is an intermediate step to allow experimental users to upgrade. To explicitly specify these options I added `revealOrder="independent"` and `tail="visible"`. I then added warnings if `undefined` or `null` is passed. You must now always explicitly specify them. However, semantics are still preserved for now until the next step. We also want to change the rendering order of the `children` prop for `revealOrder="backwards"`. As an intermediate step I first added `revealOrder="unstable_legacy-backwards"` option. This will only be temporary until all users can switch to the new `"backwards"` semantics once we flip it in the next step. I also clarified the types that the directional props requires iterable children but not iterable inside of those. Rows with multiple items can be modeled as explicit fragments. DiffTrain build for [d742611](facebook@d742611)
1 parent 5d5ddd7 commit fe657a1

24 files changed

+660
-445
lines changed

compiled-rn/VERSION_NATIVE_FB

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19.2.0-native-fb-3fb17d16-20250603
1+
19.2.0-native-fb-d742611c-20250603

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<63ae1a36a15b55bf41aeacaa214c4747>>
10+
* @generated SignedSource<<5ba333cdabfedacaf43ebe3d5bc6b1a1>>
1111
*/
1212

1313
"use strict";
@@ -404,5 +404,5 @@ __DEV__ &&
404404
exports.useFormStatus = function () {
405405
return resolveDispatcher().useHostTransitionStatus();
406406
};
407-
exports.version = "19.2.0-native-fb-3fb17d16-20250603";
407+
exports.version = "19.2.0-native-fb-d742611c-20250603";
408408
})();

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<33e62e39c6a8596eeeb510c25b91de95>>
10+
* @generated SignedSource<<4c9ba4316d4a235a6fff958e9a060379>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.2.0-native-fb-3fb17d16-20250603";
206+
exports.version = "19.2.0-native-fb-d742611c-20250603";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<33e62e39c6a8596eeeb510c25b91de95>>
10+
* @generated SignedSource<<4c9ba4316d4a235a6fff958e9a060379>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.2.0-native-fb-3fb17d16-20250603";
206+
exports.version = "19.2.0-native-fb-d742611c-20250603";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js

Lines changed: 172 additions & 143 deletions
Large diffs are not rendered by default.

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<af713a7f1668bd57d8efe85e165ab373>>
10+
* @generated SignedSource<<f938b786e9eaf90a682fa1a018b0eece>>
1111
*/
1212

1313
/*
@@ -4519,7 +4519,13 @@ function findFirstSuspended(row) {
45194519
isSuspenseInstanceFallback(state))
45204520
)
45214521
return node;
4522-
} else if (19 === node.tag && void 0 !== node.memoizedProps.revealOrder) {
4522+
} else if (
4523+
19 === node.tag &&
4524+
("forwards" === node.memoizedProps.revealOrder ||
4525+
"backwards" === node.memoizedProps.revealOrder ||
4526+
"unstable_legacy-backwards" === node.memoizedProps.revealOrder ||
4527+
"together" === node.memoizedProps.revealOrder)
4528+
) {
45234529
if (0 !== (node.flags & 128)) return node;
45244530
} else if (null !== node.child) {
45254531
node.child.return = node;
@@ -7462,6 +7468,7 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) {
74627468
);
74637469
break;
74647470
case "backwards":
7471+
case "unstable_legacy-backwards":
74657472
renderLanes = null;
74667473
revealOrder = workInProgress.child;
74677474
for (workInProgress.child = null; null !== revealOrder; ) {
@@ -17094,14 +17101,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1709417101
};
1709517102
var isomorphicReactPackageVersion$jscomp$inline_2017 = React.version;
1709617103
if (
17097-
"19.2.0-native-fb-3fb17d16-20250603" !==
17104+
"19.2.0-native-fb-d742611c-20250603" !==
1709817105
isomorphicReactPackageVersion$jscomp$inline_2017
1709917106
)
1710017107
throw Error(
1710117108
formatProdErrorMessage(
1710217109
527,
1710317110
isomorphicReactPackageVersion$jscomp$inline_2017,
17104-
"19.2.0-native-fb-3fb17d16-20250603"
17111+
"19.2.0-native-fb-d742611c-20250603"
1710517112
)
1710617113
);
1710717114
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17123,10 +17130,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1712317130
};
1712417131
var internals$jscomp$inline_2536 = {
1712517132
bundleType: 0,
17126-
version: "19.2.0-native-fb-3fb17d16-20250603",
17133+
version: "19.2.0-native-fb-d742611c-20250603",
1712717134
rendererPackageName: "react-dom",
1712817135
currentDispatcherRef: ReactSharedInternals,
17129-
reconcilerVersion: "19.2.0-native-fb-3fb17d16-20250603"
17136+
reconcilerVersion: "19.2.0-native-fb-d742611c-20250603"
1713017137
};
1713117138
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1713217139
var hook$jscomp$inline_2537 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17224,4 +17231,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1722417231
listenToAllSupportedEvents(container);
1722517232
return new ReactDOMHydrationRoot(initialChildren);
1722617233
};
17227-
exports.version = "19.2.0-native-fb-3fb17d16-20250603";
17234+
exports.version = "19.2.0-native-fb-d742611c-20250603";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<1342eedf052099976243af3897e92f89>>
10+
* @generated SignedSource<<d81ca51c17b4bf0dcee0ea3df4199bb3>>
1111
*/
1212

1313
/*
@@ -4678,7 +4678,13 @@ function findFirstSuspended(row) {
46784678
isSuspenseInstanceFallback(state))
46794679
)
46804680
return node;
4681-
} else if (19 === node.tag && void 0 !== node.memoizedProps.revealOrder) {
4681+
} else if (
4682+
19 === node.tag &&
4683+
("forwards" === node.memoizedProps.revealOrder ||
4684+
"backwards" === node.memoizedProps.revealOrder ||
4685+
"unstable_legacy-backwards" === node.memoizedProps.revealOrder ||
4686+
"together" === node.memoizedProps.revealOrder)
4687+
) {
46824688
if (0 !== (node.flags & 128)) return node;
46834689
} else if (null !== node.child) {
46844690
node.child.return = node;
@@ -7655,6 +7661,7 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) {
76557661
);
76567662
break;
76577663
case "backwards":
7664+
case "unstable_legacy-backwards":
76587665
renderLanes = null;
76597666
revealOrder = workInProgress.child;
76607667
for (workInProgress.child = null; null !== revealOrder; ) {
@@ -17804,14 +17811,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1780417811
};
1780517812
var isomorphicReactPackageVersion$jscomp$inline_2120 = React.version;
1780617813
if (
17807-
"19.2.0-native-fb-3fb17d16-20250603" !==
17814+
"19.2.0-native-fb-d742611c-20250603" !==
1780817815
isomorphicReactPackageVersion$jscomp$inline_2120
1780917816
)
1781017817
throw Error(
1781117818
formatProdErrorMessage(
1781217819
527,
1781317820
isomorphicReactPackageVersion$jscomp$inline_2120,
17814-
"19.2.0-native-fb-3fb17d16-20250603"
17821+
"19.2.0-native-fb-d742611c-20250603"
1781517822
)
1781617823
);
1781717824
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17833,10 +17840,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1783317840
};
1783417841
var internals$jscomp$inline_2127 = {
1783517842
bundleType: 0,
17836-
version: "19.2.0-native-fb-3fb17d16-20250603",
17843+
version: "19.2.0-native-fb-d742611c-20250603",
1783717844
rendererPackageName: "react-dom",
1783817845
currentDispatcherRef: ReactSharedInternals,
17839-
reconcilerVersion: "19.2.0-native-fb-3fb17d16-20250603",
17846+
reconcilerVersion: "19.2.0-native-fb-d742611c-20250603",
1784017847
getLaneLabelMap: function () {
1784117848
for (
1784217849
var map = new Map(), lane = 1, index$313 = 0;
@@ -17949,4 +17956,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1794917956
listenToAllSupportedEvents(container);
1795017957
return new ReactDOMHydrationRoot(initialChildren);
1795117958
};
17952-
exports.version = "19.2.0-native-fb-3fb17d16-20250603";
17959+
exports.version = "19.2.0-native-fb-d742611c-20250603";

0 commit comments

Comments
 (0)