Skip to content

Commit e45eec3

Browse files
committed
[Fizz] Do not reinsert stylesheets after initial insert (#27586)
The loading state tracking for suspensey CSS is too complicated. Prior to this change it had a state it could enter into where a stylesheet was already in the DOM but the loading state did not know it was inserted causing a later transition to try to insert it again. This fix is to add proper tracking of insertions on the codepaths that were missing it. It also modifies the logic of when to suspend based on whether the stylesheet has already been inserted or not. This is not 100% correct semantics however because a prior commit could have inserted a stylesheet and a later transition should ideally be able to wait on that load before committing. I haven't attempted to fix this yet however because the loading state tracking is too complicated as it is and requires a more thorough refactor. Additionally it's not particularly valuable to delay a transition on a loading stylesheet when a previous commit also relied on that stylesheet but didn't wait for it b/c it was sync. I will follow up with an improvement PR later fixes: #27585 DiffTrain build for commit a998552.
1 parent c5f2bb8 commit e45eec3

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24887,7 +24887,7 @@ function createFiberRoot(
2488724887
return root;
2488824888
}
2488924889

24890-
var ReactVersion = "18.3.0-canary-51ffd3564-20231025";
24890+
var ReactVersion = "18.3.0-canary-a9985529f-20231025";
2489124891

2489224892
// Might add PROFILE later.
2489324893

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9025,7 +9025,7 @@ var devToolsConfig$jscomp$inline_1032 = {
90259025
throw Error("TestRenderer does not support findFiberByHostInstance()");
90269026
},
90279027
bundleType: 0,
9028-
version: "18.3.0-canary-51ffd3564-20231025",
9028+
version: "18.3.0-canary-a9985529f-20231025",
90299029
rendererPackageName: "react-test-renderer"
90309030
};
90319031
var internals$jscomp$inline_1225 = {
@@ -9056,7 +9056,7 @@ var internals$jscomp$inline_1225 = {
90569056
scheduleRoot: null,
90579057
setRefreshHandler: null,
90589058
getCurrentFiber: null,
9059-
reconcilerVersion: "18.3.0-canary-51ffd3564-20231025"
9059+
reconcilerVersion: "18.3.0-canary-a9985529f-20231025"
90609060
};
90619061
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
90629062
var hook$jscomp$inline_1226 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9451,7 +9451,7 @@ var devToolsConfig$jscomp$inline_1074 = {
94519451
throw Error("TestRenderer does not support findFiberByHostInstance()");
94529452
},
94539453
bundleType: 0,
9454-
version: "18.3.0-canary-51ffd3564-20231025",
9454+
version: "18.3.0-canary-a9985529f-20231025",
94559455
rendererPackageName: "react-test-renderer"
94569456
};
94579457
var internals$jscomp$inline_1266 = {
@@ -9482,7 +9482,7 @@ var internals$jscomp$inline_1266 = {
94829482
scheduleRoot: null,
94839483
setRefreshHandler: null,
94849484
getCurrentFiber: null,
9485-
reconcilerVersion: "18.3.0-canary-51ffd3564-20231025"
9485+
reconcilerVersion: "18.3.0-canary-a9985529f-20231025"
94869486
};
94879487
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
94889488
var hook$jscomp$inline_1267 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (
2727
}
2828
"use strict";
2929

30-
var ReactVersion = "18.3.0-canary-51ffd3564-20231025";
30+
var ReactVersion = "18.3.0-canary-a9985529f-20231025";
3131

3232
// ATTENTION
3333
// When adding new symbols to this file,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,4 +580,4 @@ exports.useSyncExternalStore = function (
580580
exports.useTransition = function () {
581581
return ReactCurrentDispatcher.current.useTransition();
582582
};
583-
exports.version = "18.3.0-canary-51ffd3564-20231025";
583+
exports.version = "18.3.0-canary-a9985529f-20231025";
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
51ffd3564f97b58737df395d30628a27fa71a39d
1+
a9985529f1aa55477f0feafe2398d36707cf6108

0 commit comments

Comments
 (0)