Skip to content

Commit 740458d

Browse files
committed
Claim the useId name space for every auto named ViewTransition (facebook#33200)
This is a partial revert of facebook#33094. It's true that we don't need the server and client ViewTransition names to line up. However the server does need to be able to generate deterministic names for itself. The cheapest way to do that is using the useId algorithm. When it's used by the server, the client needs to also materialize an ID even if it doesn't use it. DiffTrain build for [96eb84e](facebook@96eb84e)
1 parent 8728b3b commit 740458d

36 files changed

+1424
-1306
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3a5b326d8180f005a10e34a07ded6d5632efe337
1+
96eb84e493c4ff2c280990659057164c0f16bbb8
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3a5b326d8180f005a10e34a07ded6d5632efe337
1+
96eb84e493c4ff2c280990659057164c0f16bbb8

compiled/facebook-www/React-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,7 @@ __DEV__ &&
15371537
exports.useTransition = function () {
15381538
return resolveDispatcher().useTransition();
15391539
};
1540-
exports.version = "19.2.0-www-classic-3a5b326d-20250513";
1540+
exports.version = "19.2.0-www-classic-96eb84e4-20250514";
15411541
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15421542
"function" ===
15431543
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,7 @@ __DEV__ &&
15371537
exports.useTransition = function () {
15381538
return resolveDispatcher().useTransition();
15391539
};
1540-
exports.version = "19.2.0-www-modern-3a5b326d-20250513";
1540+
exports.version = "19.2.0-www-modern-96eb84e4-20250514";
15411541
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15421542
"function" ===
15431543
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,4 +635,4 @@ exports.useSyncExternalStore = function (
635635
exports.useTransition = function () {
636636
return ReactSharedInternals.H.useTransition();
637637
};
638-
exports.version = "19.2.0-www-classic-3a5b326d-20250513";
638+
exports.version = "19.2.0-www-classic-96eb84e4-20250514";

compiled/facebook-www/React-prod.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,4 +635,4 @@ exports.useSyncExternalStore = function (
635635
exports.useTransition = function () {
636636
return ReactSharedInternals.H.useTransition();
637637
};
638-
exports.version = "19.2.0-www-modern-3a5b326d-20250513";
638+
exports.version = "19.2.0-www-modern-96eb84e4-20250514";

compiled/facebook-www/React-profiling.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ exports.useSyncExternalStore = function (
639639
exports.useTransition = function () {
640640
return ReactSharedInternals.H.useTransition();
641641
};
642-
exports.version = "19.2.0-www-classic-3a5b326d-20250513";
642+
exports.version = "19.2.0-www-classic-96eb84e4-20250514";
643643
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
644644
"function" ===
645645
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ exports.useSyncExternalStore = function (
639639
exports.useTransition = function () {
640640
return ReactSharedInternals.H.useTransition();
641641
};
642-
exports.version = "19.2.0-www-modern-3a5b326d-20250513";
642+
exports.version = "19.2.0-www-modern-96eb84e4-20250514";
643643
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
644644
"function" ===
645645
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 47 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -12036,18 +12036,15 @@ __DEV__ &&
1203612036
(offscreenSubtreeWasHidden ||
1203712037
null === current ||
1203812038
safelyDetachRef(current, current.return));
12039-
if (
12040-
flags & 64 &&
12039+
flags & 64 &&
1204112040
offscreenSubtreeIsHidden &&
1204212041
((flags = finishedWork.updateQueue),
12043-
null !== flags && ((current = flags.callbacks), null !== current))
12044-
) {
12045-
var existingHiddenCallbacks = flags.shared.hiddenCallbacks;
12046-
flags.shared.hiddenCallbacks =
12047-
null === existingHiddenCallbacks
12048-
? current
12049-
: existingHiddenCallbacks.concat(current);
12050-
}
12042+
null !== flags &&
12043+
((current = flags.callbacks),
12044+
null !== current &&
12045+
((root = flags.shared.hiddenCallbacks),
12046+
(flags.shared.hiddenCallbacks =
12047+
null === root ? current : root.concat(current)))));
1205112048
break;
1205212049
case 26:
1205312050
case 27:
@@ -12059,32 +12056,25 @@ __DEV__ &&
1205912056
null === current ||
1206012057
safelyDetachRef(current, current.return));
1206112058
if (finishedWork.flags & 32) {
12062-
existingHiddenCallbacks = finishedWork.stateNode;
12059+
root = finishedWork.stateNode;
1206312060
try {
12064-
runWithFiberInDEV(
12065-
finishedWork,
12066-
resetTextContent,
12067-
existingHiddenCallbacks
12068-
),
12061+
runWithFiberInDEV(finishedWork, resetTextContent, root),
1206912062
trackHostMutation();
1207012063
} catch (error) {
1207112064
captureCommitPhaseError(finishedWork, finishedWork.return, error);
1207212065
}
1207312066
}
1207412067
if (flags & 4 && null != finishedWork.stateNode) {
12075-
existingHiddenCallbacks = finishedWork.memoizedProps;
12076-
current =
12077-
null !== current
12078-
? current.memoizedProps
12079-
: existingHiddenCallbacks;
12068+
root = finishedWork.memoizedProps;
12069+
current = null !== current ? current.memoizedProps : root;
1208012070
try {
1208112071
runWithFiberInDEV(
1208212072
finishedWork,
1208312073
commitUpdate,
1208412074
finishedWork.stateNode,
1208512075
finishedWork.type,
1208612076
current,
12087-
existingHiddenCallbacks,
12077+
root,
1208812078
finishedWork
1208912079
);
1209012080
} catch (error) {
@@ -12107,12 +12097,12 @@ __DEV__ &&
1210712097
);
1210812098
flags = finishedWork.memoizedProps;
1210912099
current = null !== current ? current.memoizedProps : flags;
12110-
existingHiddenCallbacks = finishedWork.stateNode;
12100+
root = finishedWork.stateNode;
1211112101
try {
1211212102
runWithFiberInDEV(
1211312103
finishedWork,
1211412104
commitTextUpdate,
12115-
existingHiddenCallbacks,
12105+
root,
1211612106
current,
1211712107
flags
1211812108
),
@@ -12156,14 +12146,11 @@ __DEV__ &&
1215612146
recursivelyTraverseMutationEffects(root, finishedWork, lanes);
1215712147
commitReconciliationEffects(finishedWork);
1215812148
finishedWork.child.flags & 8192 &&
12159-
((existingHiddenCallbacks = null !== finishedWork.memoizedState),
12149+
((root = null !== finishedWork.memoizedState),
1216012150
(current = null !== current && null !== current.memoizedState),
1216112151
alwaysThrottleRetries
12162-
? existingHiddenCallbacks !== current &&
12163-
(globalMostRecentFallbackTime = now$1())
12164-
: existingHiddenCallbacks &&
12165-
!current &&
12166-
(globalMostRecentFallbackTime = now$1()));
12152+
? root !== current && (globalMostRecentFallbackTime = now$1())
12153+
: root && !current && (globalMostRecentFallbackTime = now$1()));
1216712154
if (flags & 4) {
1216812155
try {
1216912156
if (null !== finishedWork.memoizedState) {
@@ -12244,19 +12231,15 @@ __DEV__ &&
1224412231
if (null === current) {
1224512232
lanes = current = root;
1224612233
try {
12247-
(existingHiddenCallbacks = lanes.stateNode),
12248-
suspenseCallback
12249-
? runWithFiberInDEV(
12250-
lanes,
12251-
hideInstance,
12252-
existingHiddenCallbacks
12253-
)
12254-
: runWithFiberInDEV(
12255-
lanes,
12256-
unhideInstance,
12257-
lanes.stateNode,
12258-
lanes.memoizedProps
12259-
);
12234+
var instance = lanes.stateNode;
12235+
suspenseCallback
12236+
? runWithFiberInDEV(lanes, hideInstance, instance)
12237+
: runWithFiberInDEV(
12238+
lanes,
12239+
unhideInstance,
12240+
lanes.stateNode,
12241+
lanes.memoizedProps
12242+
);
1226012243
} catch (error) {
1226112244
captureCommitPhaseError(lanes, lanes.return, error);
1226212245
}
@@ -12265,13 +12248,17 @@ __DEV__ &&
1226512248
if (null === current) {
1226612249
lanes = root;
1226712250
try {
12268-
var instance = lanes.stateNode;
12251+
var instance$jscomp$0 = lanes.stateNode;
1226912252
suspenseCallback
12270-
? runWithFiberInDEV(lanes, hideTextInstance, instance)
12253+
? runWithFiberInDEV(
12254+
lanes,
12255+
hideTextInstance,
12256+
instance$jscomp$0
12257+
)
1227112258
: runWithFiberInDEV(
1227212259
lanes,
1227312260
unhideTextInstance,
12274-
instance,
12261+
instance$jscomp$0,
1227512262
lanes.memoizedProps
1227612263
);
1227712264
trackHostMutation();
@@ -12283,12 +12270,12 @@ __DEV__ &&
1228312270
if (null === current) {
1228412271
lanes = root;
1228512272
try {
12286-
var instance$jscomp$0 = lanes.stateNode;
12273+
var instance$jscomp$1 = lanes.stateNode;
1228712274
suspenseCallback
1228812275
? runWithFiberInDEV(
1228912276
lanes,
1229012277
hideDehydratedBoundary,
12291-
instance$jscomp$0
12278+
instance$jscomp$1
1229212279
)
1229312280
: runWithFiberInDEV(
1229412281
lanes,
@@ -12344,10 +12331,17 @@ __DEV__ &&
1234412331
null === current ||
1234512332
safelyDetachRef(current, current.return)),
1234612333
(flags = pushMutationContext()),
12334+
(instance = enableViewTransition && (lanes & 335544064) === lanes),
12335+
(instance$jscomp$0 = finishedWork.memoizedProps),
12336+
instance &&
12337+
"none" !==
12338+
getViewTransitionClassName(
12339+
instance$jscomp$0.default,
12340+
instance$jscomp$0.update
12341+
),
1234712342
recursivelyTraverseMutationEffects(root, finishedWork, lanes),
1234812343
commitReconciliationEffects(finishedWork),
12349-
enableViewTransition &&
12350-
(lanes & 335544064) === lanes &&
12344+
instance &&
1235112345
null !== current &&
1235212346
viewTransitionMutationContext &&
1235312347
(finishedWork.flags |= 4),
@@ -19069,10 +19063,10 @@ __DEV__ &&
1906919063
(function () {
1907019064
var internals = {
1907119065
bundleType: 1,
19072-
version: "19.2.0-www-classic-3a5b326d-20250513",
19066+
version: "19.2.0-www-classic-96eb84e4-20250514",
1907319067
rendererPackageName: "react-art",
1907419068
currentDispatcherRef: ReactSharedInternals,
19075-
reconcilerVersion: "19.2.0-www-classic-3a5b326d-20250513"
19069+
reconcilerVersion: "19.2.0-www-classic-96eb84e4-20250514"
1907619070
};
1907719071
internals.overrideHookState = overrideHookState;
1907819072
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -19106,7 +19100,7 @@ __DEV__ &&
1910619100
exports.Shape = Shape;
1910719101
exports.Surface = Surface;
1910819102
exports.Text = Text;
19109-
exports.version = "19.2.0-www-classic-3a5b326d-20250513";
19103+
exports.version = "19.2.0-www-classic-96eb84e4-20250514";
1911019104
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1911119105
"function" ===
1911219106
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)