Skip to content

Commit 6e94fc8

Browse files
committed
[Fiber] Instrument the lazy initializer thenable in all cases (facebook#35521)
When a lazy element or component is initialized a thenable is returned which was only be conditionally instrumented in dev when asyncDebugInfo was enabled. When instrumented these thenables can be used in conjunction with the SuspendOnImmediate optimization where if a thenable resolves before the stack unwinds we can continue rendering from the last suspended fiber. Without this change a recent fix to the useId implementation cannot be easily tested in production because this optimization pathway isn't available to regular React.lazy thenables. To land the prior PR I changed the thenables to a custom type so I could instrument manually in the test. WIth this change we can just use a regular Promise since ReactLazy will instrument in all environments/flags now DiffTrain build for [db71391](facebook@db71391)
1 parent ec7f46b commit 6e94fc8

File tree

21 files changed

+1767
-1625
lines changed

21 files changed

+1767
-1625
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.3.0-native-fb-4a3d993e-20260114
1+
19.3.0-native-fb-db71391c-20260115

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<<8fdc988232171808b42c4d5042262db1>>
10+
* @generated SignedSource<<82c182bed1fefca28eee5650c2e587c8>>
1111
*/
1212

1313
"use strict";
@@ -410,5 +410,5 @@ __DEV__ &&
410410
exports.useFormStatus = function () {
411411
return resolveDispatcher().useHostTransitionStatus();
412412
};
413-
exports.version = "19.3.0-native-fb-4a3d993e-20260114";
413+
exports.version = "19.3.0-native-fb-db71391c-20260115";
414414
})();

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<<e75344f749ee920665ba7d77c0a30c7a>>
10+
* @generated SignedSource<<180f7cd755cc113a052e530ccc54af00>>
1111
*/
1212

1313
"use strict";
@@ -209,4 +209,4 @@ exports.useFormState = function (action, initialState, permalink) {
209209
exports.useFormStatus = function () {
210210
return ReactSharedInternals.H.useHostTransitionStatus();
211211
};
212-
exports.version = "19.3.0-native-fb-4a3d993e-20260114";
212+
exports.version = "19.3.0-native-fb-db71391c-20260115";

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<<e75344f749ee920665ba7d77c0a30c7a>>
10+
* @generated SignedSource<<180f7cd755cc113a052e530ccc54af00>>
1111
*/
1212

1313
"use strict";
@@ -209,4 +209,4 @@ exports.useFormState = function (action, initialState, permalink) {
209209
exports.useFormStatus = function () {
210210
return ReactSharedInternals.H.useHostTransitionStatus();
211211
};
212-
exports.version = "19.3.0-native-fb-4a3d993e-20260114";
212+
exports.version = "19.3.0-native-fb-db71391c-20260115";

0 commit comments

Comments
 (0)