Skip to content

Commit 635b8b6

Browse files
committed
fix: use public instance in Fiber renderer and expose it from getInspectorDataForViewAtPoint (#31068)
React DevTools no longer operates with just Fibers, it now builds its own Shadow Tree, which represents the tree on the Host (Fabric on Native, DOM on Web). We have to keep track of public instances for a select-to-inspect feature. We've recently changed this logic in #30831, and looks like we've been incorrectly getting a public instance for Fabric case. Not only this, turns out that all `getInspectorData...` APIs are returning Fibers, and not public instances. I have to expose it, so that React DevTools can correctly identify the element, which was selected. Changes for React Native are in [D63421463](https://www.internalfb.com/diff/D63421463) DiffTrain build for commit d66fa02.
1 parent 2baa9b4 commit 635b8b6

24 files changed

+106
-95
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.0.0-native-fb-778e1ed2-20240926
1+
19.0.0-native-fb-d66fa02a-20240926

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<<1d391b897b28e0a40b463f0cd330ecb9>>
10+
* @generated SignedSource<<d00372bc01109f18348cdf21c4e9a6b8>>
1111
*/
1212

1313
"use strict";
@@ -420,5 +420,5 @@ __DEV__ &&
420420
exports.useFormStatus = function () {
421421
return resolveDispatcher().useHostTransitionStatus();
422422
};
423-
exports.version = "19.0.0-native-fb-778e1ed2-20240926";
423+
exports.version = "19.0.0-native-fb-d66fa02a-20240926";
424424
})();

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<<8f65f0b5da0551267ae8d9135836943a>>
10+
* @generated SignedSource<<868c2c45377609fdc75a190d68337a3e>>
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.0.0-native-fb-778e1ed2-20240926";
206+
exports.version = "19.0.0-native-fb-d66fa02a-20240926";

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<<8f65f0b5da0551267ae8d9135836943a>>
10+
* @generated SignedSource<<868c2c45377609fdc75a190d68337a3e>>
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.0.0-native-fb-778e1ed2-20240926";
206+
exports.version = "19.0.0-native-fb-d66fa02a-20240926";

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<<f5ffc0c36bad3a894dfe63de67ba82c1>>
10+
* @generated SignedSource<<98ff6e44e31c0a99c44b8c8b36e4c12b>>
1111
*/
1212

1313
/*
@@ -25472,11 +25472,11 @@ __DEV__ &&
2547225472
};
2547325473
(function () {
2547425474
var isomorphicReactPackageVersion = React.version;
25475-
if ("19.0.0-native-fb-778e1ed2-20240926" !== isomorphicReactPackageVersion)
25475+
if ("19.0.0-native-fb-d66fa02a-20240926" !== isomorphicReactPackageVersion)
2547625476
throw Error(
2547725477
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2547825478
(isomorphicReactPackageVersion +
25479-
"\n - react-dom: 19.0.0-native-fb-778e1ed2-20240926\nLearn more: https://react.dev/warnings/version-mismatch")
25479+
"\n - react-dom: 19.0.0-native-fb-d66fa02a-20240926\nLearn more: https://react.dev/warnings/version-mismatch")
2548025480
);
2548125481
})();
2548225482
("function" === typeof Map &&
@@ -25513,11 +25513,11 @@ __DEV__ &&
2551325513
!(function () {
2551425514
var internals = {
2551525515
bundleType: 1,
25516-
version: "19.0.0-native-fb-778e1ed2-20240926",
25516+
version: "19.0.0-native-fb-d66fa02a-20240926",
2551725517
rendererPackageName: "react-dom",
2551825518
currentDispatcherRef: ReactSharedInternals,
2551925519
findFiberByHostInstance: getClosestInstanceFromNode,
25520-
reconcilerVersion: "19.0.0-native-fb-778e1ed2-20240926"
25520+
reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926"
2552125521
};
2552225522
internals.overrideHookState = overrideHookState;
2552325523
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -25661,5 +25661,5 @@ __DEV__ &&
2566125661
listenToAllSupportedEvents(container);
2566225662
return new ReactDOMHydrationRoot(initialChildren);
2566325663
};
25664-
exports.version = "19.0.0-native-fb-778e1ed2-20240926";
25664+
exports.version = "19.0.0-native-fb-d66fa02a-20240926";
2566525665
})();

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<<4015a32f0a281b58a4049cc13ffda2fe>>
10+
* @generated SignedSource<<a09f33651fe28a1f192a618ac0cb95b1>>
1111
*/
1212

1313
/*
@@ -15753,14 +15753,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1575315753
};
1575415754
var isomorphicReactPackageVersion$jscomp$inline_1708 = React.version;
1575515755
if (
15756-
"19.0.0-native-fb-778e1ed2-20240926" !==
15756+
"19.0.0-native-fb-d66fa02a-20240926" !==
1575715757
isomorphicReactPackageVersion$jscomp$inline_1708
1575815758
)
1575915759
throw Error(
1576015760
formatProdErrorMessage(
1576115761
527,
1576215762
isomorphicReactPackageVersion$jscomp$inline_1708,
15763-
"19.0.0-native-fb-778e1ed2-20240926"
15763+
"19.0.0-native-fb-d66fa02a-20240926"
1576415764
)
1576515765
);
1576615766
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -15782,11 +15782,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1578215782
};
1578315783
var internals$jscomp$inline_2151 = {
1578415784
bundleType: 0,
15785-
version: "19.0.0-native-fb-778e1ed2-20240926",
15785+
version: "19.0.0-native-fb-d66fa02a-20240926",
1578615786
rendererPackageName: "react-dom",
1578715787
currentDispatcherRef: ReactSharedInternals,
1578815788
findFiberByHostInstance: getClosestInstanceFromNode,
15789-
reconcilerVersion: "19.0.0-native-fb-778e1ed2-20240926"
15789+
reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926"
1579015790
};
1579115791
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1579215792
var hook$jscomp$inline_2152 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -15890,4 +15890,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1589015890
listenToAllSupportedEvents(container);
1589115891
return new ReactDOMHydrationRoot(initialChildren);
1589215892
};
15893-
exports.version = "19.0.0-native-fb-778e1ed2-20240926";
15893+
exports.version = "19.0.0-native-fb-d66fa02a-20240926";

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<<e0edad628e3ae9cf5c58cd69e3f3278c>>
10+
* @generated SignedSource<<7ce56cadd95efb065db34a90177a79eb>>
1111
*/
1212

1313
/*
@@ -16405,14 +16405,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1640516405
};
1640616406
var isomorphicReactPackageVersion$jscomp$inline_1798 = React.version;
1640716407
if (
16408-
"19.0.0-native-fb-778e1ed2-20240926" !==
16408+
"19.0.0-native-fb-d66fa02a-20240926" !==
1640916409
isomorphicReactPackageVersion$jscomp$inline_1798
1641016410
)
1641116411
throw Error(
1641216412
formatProdErrorMessage(
1641316413
527,
1641416414
isomorphicReactPackageVersion$jscomp$inline_1798,
16415-
"19.0.0-native-fb-778e1ed2-20240926"
16415+
"19.0.0-native-fb-d66fa02a-20240926"
1641616416
)
1641716417
);
1641816418
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -16434,11 +16434,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1643416434
};
1643516435
var internals$jscomp$inline_1805 = {
1643616436
bundleType: 0,
16437-
version: "19.0.0-native-fb-778e1ed2-20240926",
16437+
version: "19.0.0-native-fb-d66fa02a-20240926",
1643816438
rendererPackageName: "react-dom",
1643916439
currentDispatcherRef: ReactSharedInternals,
1644016440
findFiberByHostInstance: getClosestInstanceFromNode,
16441-
reconcilerVersion: "19.0.0-native-fb-778e1ed2-20240926",
16441+
reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926",
1644216442
getLaneLabelMap: function () {
1644316443
for (
1644416444
var map = new Map(), lane = 1, index$292 = 0;
@@ -16557,4 +16557,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1655716557
listenToAllSupportedEvents(container);
1655816558
return new ReactDOMHydrationRoot(initialChildren);
1655916559
};
16560-
exports.version = "19.0.0-native-fb-778e1ed2-20240926";
16560+
exports.version = "19.0.0-native-fb-d66fa02a-20240926";

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<<7461bb5e8388b2ab269e15f33f1e8d01>>
10+
* @generated SignedSource<<8c15d4eb3be49fe903be47b5a2def320>>
1111
*/
1212

1313
/*
@@ -25533,11 +25533,11 @@ __DEV__ &&
2553325533
};
2553425534
(function () {
2553525535
var isomorphicReactPackageVersion = React.version;
25536-
if ("19.0.0-native-fb-778e1ed2-20240926" !== isomorphicReactPackageVersion)
25536+
if ("19.0.0-native-fb-d66fa02a-20240926" !== isomorphicReactPackageVersion)
2553725537
throw Error(
2553825538
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2553925539
(isomorphicReactPackageVersion +
25540-
"\n - react-dom: 19.0.0-native-fb-778e1ed2-20240926\nLearn more: https://react.dev/warnings/version-mismatch")
25540+
"\n - react-dom: 19.0.0-native-fb-d66fa02a-20240926\nLearn more: https://react.dev/warnings/version-mismatch")
2554125541
);
2554225542
})();
2554325543
("function" === typeof Map &&
@@ -25574,11 +25574,11 @@ __DEV__ &&
2557425574
!(function () {
2557525575
var internals = {
2557625576
bundleType: 1,
25577-
version: "19.0.0-native-fb-778e1ed2-20240926",
25577+
version: "19.0.0-native-fb-d66fa02a-20240926",
2557825578
rendererPackageName: "react-dom",
2557925579
currentDispatcherRef: ReactSharedInternals,
2558025580
findFiberByHostInstance: getClosestInstanceFromNode,
25581-
reconcilerVersion: "19.0.0-native-fb-778e1ed2-20240926"
25581+
reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926"
2558225582
};
2558325583
internals.overrideHookState = overrideHookState;
2558425584
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -26038,7 +26038,7 @@ __DEV__ &&
2603826038
exports.useFormStatus = function () {
2603926039
return resolveDispatcher().useHostTransitionStatus();
2604026040
};
26041-
exports.version = "19.0.0-native-fb-778e1ed2-20240926";
26041+
exports.version = "19.0.0-native-fb-d66fa02a-20240926";
2604226042
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2604326043
"function" ===
2604426044
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<<74da68ece113c9837fd5a5f7ffa9656d>>
10+
* @generated SignedSource<<7f6e01bcfc6180fc72882ab81f548447>>
1111
*/
1212

1313
/*
@@ -15764,14 +15764,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1576415764
};
1576515765
var isomorphicReactPackageVersion$jscomp$inline_1709 = React.version;
1576615766
if (
15767-
"19.0.0-native-fb-778e1ed2-20240926" !==
15767+
"19.0.0-native-fb-d66fa02a-20240926" !==
1576815768
isomorphicReactPackageVersion$jscomp$inline_1709
1576915769
)
1577015770
throw Error(
1577115771
formatProdErrorMessage(
1577215772
527,
1577315773
isomorphicReactPackageVersion$jscomp$inline_1709,
15774-
"19.0.0-native-fb-778e1ed2-20240926"
15774+
"19.0.0-native-fb-d66fa02a-20240926"
1577515775
)
1577615776
);
1577715777
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -15793,11 +15793,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1579315793
};
1579415794
var internals$jscomp$inline_2154 = {
1579515795
bundleType: 0,
15796-
version: "19.0.0-native-fb-778e1ed2-20240926",
15796+
version: "19.0.0-native-fb-d66fa02a-20240926",
1579715797
rendererPackageName: "react-dom",
1579815798
currentDispatcherRef: ReactSharedInternals,
1579915799
findFiberByHostInstance: getClosestInstanceFromNode,
15800-
reconcilerVersion: "19.0.0-native-fb-778e1ed2-20240926"
15800+
reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926"
1580115801
};
1580215802
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1580315803
var hook$jscomp$inline_2155 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -16055,4 +16055,4 @@ exports.useFormState = function (action, initialState, permalink) {
1605516055
exports.useFormStatus = function () {
1605616056
return ReactSharedInternals.H.useHostTransitionStatus();
1605716057
};
16058-
exports.version = "19.0.0-native-fb-778e1ed2-20240926";
16058+
exports.version = "19.0.0-native-fb-d66fa02a-20240926";

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<<b24d0195159b5ddf5dec2f940e88a49a>>
10+
* @generated SignedSource<<69ce8346e39ef9afc32e5fd40a790fcd>>
1111
*/
1212

1313
/*
@@ -16420,14 +16420,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1642016420
};
1642116421
var isomorphicReactPackageVersion$jscomp$inline_1799 = React.version;
1642216422
if (
16423-
"19.0.0-native-fb-778e1ed2-20240926" !==
16423+
"19.0.0-native-fb-d66fa02a-20240926" !==
1642416424
isomorphicReactPackageVersion$jscomp$inline_1799
1642516425
)
1642616426
throw Error(
1642716427
formatProdErrorMessage(
1642816428
527,
1642916429
isomorphicReactPackageVersion$jscomp$inline_1799,
16430-
"19.0.0-native-fb-778e1ed2-20240926"
16430+
"19.0.0-native-fb-d66fa02a-20240926"
1643116431
)
1643216432
);
1643316433
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -16449,11 +16449,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1644916449
};
1645016450
var internals$jscomp$inline_1806 = {
1645116451
bundleType: 0,
16452-
version: "19.0.0-native-fb-778e1ed2-20240926",
16452+
version: "19.0.0-native-fb-d66fa02a-20240926",
1645316453
rendererPackageName: "react-dom",
1645416454
currentDispatcherRef: ReactSharedInternals,
1645516455
findFiberByHostInstance: getClosestInstanceFromNode,
16456-
reconcilerVersion: "19.0.0-native-fb-778e1ed2-20240926",
16456+
reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926",
1645716457
getLaneLabelMap: function () {
1645816458
for (
1645916459
var map = new Map(), lane = 1, index$292 = 0;
@@ -16726,7 +16726,7 @@ exports.useFormState = function (action, initialState, permalink) {
1672616726
exports.useFormStatus = function () {
1672716727
return ReactSharedInternals.H.useHostTransitionStatus();
1672816728
};
16729-
exports.version = "19.0.0-native-fb-778e1ed2-20240926";
16729+
exports.version = "19.0.0-native-fb-d66fa02a-20240926";
1673016730
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1673116731
"function" ===
1673216732
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)