Skip to content

Commit 759ba05

Browse files
committed
[Flight] Add approximate parent context for FormatContext (facebook#34601)
Flight doesn't have any semantically sound notion of a parent context. That's why we removed Server Context. Each root can really start anywhere in the tree when you refetch subtrees. Additionally when you dedupe elements they can end up in multiple different parent contexts. However, we do have a DEV only version of this with debugTask being tracked for the nearest parent element to track the context of properties inside of it. To apply certain DOM specific hints and optimizations when you render host components we need some information of the context. This is usually very local so doesn't suffer from the likelihood that you refetch in the middle. We'll also only use this information for optimistic hints and not hard semantics so getting it wrong isn't terrible. ``` <picture> <img /> </picture> <noscript> <p> <img /> </p> </noscript> ``` For example, in these cases we should exclude preloading the image but we have to know if that's the scope we're in. We can easily get this wrong if they're split or even if they're wrapped in client components that we don't know about like: ``` <NoScript> <p> <img /> </p> </NoScript> ``` However, getting it wrong in either direction is not the end of the world. It's about covering the common cases well. DiffTrain build for [b0c1dc0](facebook@b0c1dc0)
1 parent 61447e2 commit 759ba05

24 files changed

+87
-87
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-c44fbf43-20250924
1+
19.2.0-native-fb-b0c1dc01-20250925

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<<d8b5b38833da8d8ebb92b12443e04dbb>>
10+
* @generated SignedSource<<0a7ad83faa1846b190d592fef84a4c84>>
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-c44fbf43-20250924";
407+
exports.version = "19.2.0-native-fb-b0c1dc01-20250925";
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<<47b6670c10050a1a7ab33ff63b8a5c5c>>
10+
* @generated SignedSource<<19a093cd059c29f432e5be0a8dbbfc21>>
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-c44fbf43-20250924";
206+
exports.version = "19.2.0-native-fb-b0c1dc01-20250925";

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<<47b6670c10050a1a7ab33ff63b8a5c5c>>
10+
* @generated SignedSource<<19a093cd059c29f432e5be0a8dbbfc21>>
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-c44fbf43-20250924";
206+
exports.version = "19.2.0-native-fb-b0c1dc01-20250925";

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

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

1313
/*
@@ -29920,11 +29920,11 @@ __DEV__ &&
2992029920
};
2992129921
(function () {
2992229922
var isomorphicReactPackageVersion = React.version;
29923-
if ("19.2.0-native-fb-c44fbf43-20250924" !== isomorphicReactPackageVersion)
29923+
if ("19.2.0-native-fb-b0c1dc01-20250925" !== isomorphicReactPackageVersion)
2992429924
throw Error(
2992529925
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2992629926
(isomorphicReactPackageVersion +
29927-
"\n - react-dom: 19.2.0-native-fb-c44fbf43-20250924\nLearn more: https://react.dev/warnings/version-mismatch")
29927+
"\n - react-dom: 19.2.0-native-fb-b0c1dc01-20250925\nLearn more: https://react.dev/warnings/version-mismatch")
2992829928
);
2992929929
})();
2993029930
("function" === typeof Map &&
@@ -29961,10 +29961,10 @@ __DEV__ &&
2996129961
!(function () {
2996229962
var internals = {
2996329963
bundleType: 1,
29964-
version: "19.2.0-native-fb-c44fbf43-20250924",
29964+
version: "19.2.0-native-fb-b0c1dc01-20250925",
2996529965
rendererPackageName: "react-dom",
2996629966
currentDispatcherRef: ReactSharedInternals,
29967-
reconcilerVersion: "19.2.0-native-fb-c44fbf43-20250924"
29967+
reconcilerVersion: "19.2.0-native-fb-b0c1dc01-20250925"
2996829968
};
2996929969
internals.overrideHookState = overrideHookState;
2997029970
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -30113,5 +30113,5 @@ __DEV__ &&
3011330113
listenToAllSupportedEvents(container);
3011430114
return new ReactDOMHydrationRoot(initialChildren);
3011530115
};
30116-
exports.version = "19.2.0-native-fb-c44fbf43-20250924";
30116+
exports.version = "19.2.0-native-fb-b0c1dc01-20250925";
3011730117
})();

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

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

1313
/*
@@ -17529,14 +17529,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1752917529
};
1753017530
var isomorphicReactPackageVersion$jscomp$inline_2052 = React.version;
1753117531
if (
17532-
"19.2.0-native-fb-c44fbf43-20250924" !==
17532+
"19.2.0-native-fb-b0c1dc01-20250925" !==
1753317533
isomorphicReactPackageVersion$jscomp$inline_2052
1753417534
)
1753517535
throw Error(
1753617536
formatProdErrorMessage(
1753717537
527,
1753817538
isomorphicReactPackageVersion$jscomp$inline_2052,
17539-
"19.2.0-native-fb-c44fbf43-20250924"
17539+
"19.2.0-native-fb-b0c1dc01-20250925"
1754017540
)
1754117541
);
1754217542
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17558,10 +17558,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1755817558
};
1755917559
var internals$jscomp$inline_2625 = {
1756017560
bundleType: 0,
17561-
version: "19.2.0-native-fb-c44fbf43-20250924",
17561+
version: "19.2.0-native-fb-b0c1dc01-20250925",
1756217562
rendererPackageName: "react-dom",
1756317563
currentDispatcherRef: ReactSharedInternals,
17564-
reconcilerVersion: "19.2.0-native-fb-c44fbf43-20250924"
17564+
reconcilerVersion: "19.2.0-native-fb-b0c1dc01-20250925"
1756517565
};
1756617566
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1756717567
var hook$jscomp$inline_2626 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17668,4 +17668,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1766817668
listenToAllSupportedEvents(container);
1766917669
return new ReactDOMHydrationRoot(initialChildren);
1767017670
};
17671-
exports.version = "19.2.0-native-fb-c44fbf43-20250924";
17671+
exports.version = "19.2.0-native-fb-b0c1dc01-20250925";

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

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

1313
/*
@@ -19622,14 +19622,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1962219622
};
1962319623
var isomorphicReactPackageVersion$jscomp$inline_2343 = React.version;
1962419624
if (
19625-
"19.2.0-native-fb-c44fbf43-20250924" !==
19625+
"19.2.0-native-fb-b0c1dc01-20250925" !==
1962619626
isomorphicReactPackageVersion$jscomp$inline_2343
1962719627
)
1962819628
throw Error(
1962919629
formatProdErrorMessage(
1963019630
527,
1963119631
isomorphicReactPackageVersion$jscomp$inline_2343,
19632-
"19.2.0-native-fb-c44fbf43-20250924"
19632+
"19.2.0-native-fb-b0c1dc01-20250925"
1963319633
)
1963419634
);
1963519635
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19651,10 +19651,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1965119651
};
1965219652
var internals$jscomp$inline_2350 = {
1965319653
bundleType: 0,
19654-
version: "19.2.0-native-fb-c44fbf43-20250924",
19654+
version: "19.2.0-native-fb-b0c1dc01-20250925",
1965519655
rendererPackageName: "react-dom",
1965619656
currentDispatcherRef: ReactSharedInternals,
19657-
reconcilerVersion: "19.2.0-native-fb-c44fbf43-20250924",
19657+
reconcilerVersion: "19.2.0-native-fb-b0c1dc01-20250925",
1965819658
getLaneLabelMap: function () {
1965919659
for (
1966019660
var map = new Map(), lane = 1, index$330 = 0;
@@ -19777,4 +19777,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1977719777
listenToAllSupportedEvents(container);
1977819778
return new ReactDOMHydrationRoot(initialChildren);
1977919779
};
19780-
exports.version = "19.2.0-native-fb-c44fbf43-20250924";
19780+
exports.version = "19.2.0-native-fb-b0c1dc01-20250925";

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<0ed2a3a796c3ba2a191afe10e9be093b>>
10+
* @generated SignedSource<<968bd5e0456c8b1f60985b08e2533229>>
1111
*/
1212

1313
/*
@@ -29976,11 +29976,11 @@ __DEV__ &&
2997629976
};
2997729977
(function () {
2997829978
var isomorphicReactPackageVersion = React.version;
29979-
if ("19.2.0-native-fb-c44fbf43-20250924" !== isomorphicReactPackageVersion)
29979+
if ("19.2.0-native-fb-b0c1dc01-20250925" !== isomorphicReactPackageVersion)
2998029980
throw Error(
2998129981
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2998229982
(isomorphicReactPackageVersion +
29983-
"\n - react-dom: 19.2.0-native-fb-c44fbf43-20250924\nLearn more: https://react.dev/warnings/version-mismatch")
29983+
"\n - react-dom: 19.2.0-native-fb-b0c1dc01-20250925\nLearn more: https://react.dev/warnings/version-mismatch")
2998429984
);
2998529985
})();
2998629986
("function" === typeof Map &&
@@ -30017,10 +30017,10 @@ __DEV__ &&
3001730017
!(function () {
3001830018
var internals = {
3001930019
bundleType: 1,
30020-
version: "19.2.0-native-fb-c44fbf43-20250924",
30020+
version: "19.2.0-native-fb-b0c1dc01-20250925",
3002130021
rendererPackageName: "react-dom",
3002230022
currentDispatcherRef: ReactSharedInternals,
30023-
reconcilerVersion: "19.2.0-native-fb-c44fbf43-20250924"
30023+
reconcilerVersion: "19.2.0-native-fb-b0c1dc01-20250925"
3002430024
};
3002530025
internals.overrideHookState = overrideHookState;
3002630026
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -30485,7 +30485,7 @@ __DEV__ &&
3048530485
exports.useFormStatus = function () {
3048630486
return resolveDispatcher().useHostTransitionStatus();
3048730487
};
30488-
exports.version = "19.2.0-native-fb-c44fbf43-20250924";
30488+
exports.version = "19.2.0-native-fb-b0c1dc01-20250925";
3048930489
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
3049030490
"function" ===
3049130491
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

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

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

1313
/*
@@ -17540,14 +17540,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1754017540
};
1754117541
var isomorphicReactPackageVersion$jscomp$inline_2053 = React.version;
1754217542
if (
17543-
"19.2.0-native-fb-c44fbf43-20250924" !==
17543+
"19.2.0-native-fb-b0c1dc01-20250925" !==
1754417544
isomorphicReactPackageVersion$jscomp$inline_2053
1754517545
)
1754617546
throw Error(
1754717547
formatProdErrorMessage(
1754817548
527,
1754917549
isomorphicReactPackageVersion$jscomp$inline_2053,
17550-
"19.2.0-native-fb-c44fbf43-20250924"
17550+
"19.2.0-native-fb-b0c1dc01-20250925"
1755117551
)
1755217552
);
1755317553
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17569,10 +17569,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1756917569
};
1757017570
var internals$jscomp$inline_2628 = {
1757117571
bundleType: 0,
17572-
version: "19.2.0-native-fb-c44fbf43-20250924",
17572+
version: "19.2.0-native-fb-b0c1dc01-20250925",
1757317573
rendererPackageName: "react-dom",
1757417574
currentDispatcherRef: ReactSharedInternals,
17575-
reconcilerVersion: "19.2.0-native-fb-c44fbf43-20250924"
17575+
reconcilerVersion: "19.2.0-native-fb-b0c1dc01-20250925"
1757617576
};
1757717577
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1757817578
var hook$jscomp$inline_2629 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17832,4 +17832,4 @@ exports.useFormState = function (action, initialState, permalink) {
1783217832
exports.useFormStatus = function () {
1783317833
return ReactSharedInternals.H.useHostTransitionStatus();
1783417834
};
17835-
exports.version = "19.2.0-native-fb-c44fbf43-20250924";
17835+
exports.version = "19.2.0-native-fb-b0c1dc01-20250925";

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

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

1313
/*
@@ -19637,14 +19637,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1963719637
};
1963819638
var isomorphicReactPackageVersion$jscomp$inline_2344 = React.version;
1963919639
if (
19640-
"19.2.0-native-fb-c44fbf43-20250924" !==
19640+
"19.2.0-native-fb-b0c1dc01-20250925" !==
1964119641
isomorphicReactPackageVersion$jscomp$inline_2344
1964219642
)
1964319643
throw Error(
1964419644
formatProdErrorMessage(
1964519645
527,
1964619646
isomorphicReactPackageVersion$jscomp$inline_2344,
19647-
"19.2.0-native-fb-c44fbf43-20250924"
19647+
"19.2.0-native-fb-b0c1dc01-20250925"
1964819648
)
1964919649
);
1965019650
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19666,10 +19666,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1966619666
};
1966719667
var internals$jscomp$inline_2351 = {
1966819668
bundleType: 0,
19669-
version: "19.2.0-native-fb-c44fbf43-20250924",
19669+
version: "19.2.0-native-fb-b0c1dc01-20250925",
1967019670
rendererPackageName: "react-dom",
1967119671
currentDispatcherRef: ReactSharedInternals,
19672-
reconcilerVersion: "19.2.0-native-fb-c44fbf43-20250924",
19672+
reconcilerVersion: "19.2.0-native-fb-b0c1dc01-20250925",
1967319673
getLaneLabelMap: function () {
1967419674
for (
1967519675
var map = new Map(), lane = 1, index$330 = 0;
@@ -19945,7 +19945,7 @@ exports.useFormState = function (action, initialState, permalink) {
1994519945
exports.useFormStatus = function () {
1994619946
return ReactSharedInternals.H.useHostTransitionStatus();
1994719947
};
19948-
exports.version = "19.2.0-native-fb-c44fbf43-20250924";
19948+
exports.version = "19.2.0-native-fb-b0c1dc01-20250925";
1994919949
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1995019950
"function" ===
1995119951
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)