Skip to content

Commit 9d88d1f

Browse files
committed
Support highlights for React Native apps in dev tools (#26060)
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn debug-test --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> This pull request emit the trace update events `drawTraceUpdates` with the trace frame information when the trace update drawer runs outside of web environment. This allows React Devtool running in mobile or other platforms have a chance to render such highlights and provide similar feature on web to provide re-render highlights. This is a feature needed for identifying unnecessary re-renders. ## How did you test this change? <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. --> I tested this change with Flipper desktop app running against mobile app, and verified that the event with correct array of frames are passing through properly. DiffTrain build for [758fc7f](758fc7f) [View git log for this commit](https://github.com/facebook/react/commits/758fc7fde10f49912b18496299506cba30d6029b)
1 parent 79ef501 commit 9d88d1f

28 files changed

+42
-42
lines changed

compiled/facebook-www/REVISION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
01a0c4e12c6aa9732d290e13b1452f72d276934d
1+
758fc7fde10f49912b18496299506cba30d6029b
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
01a0c4e12c6aa9732d290e13b1452f72d276934d
1+
758fc7fde10f49912b18496299506cba30d6029b

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (
2727
}
2828
"use strict";
2929

30-
var ReactVersion = "18.3.0-www-classic-01a0c4e12-20230207";
30+
var ReactVersion = "18.3.0-www-classic-758fc7fde-20230207";
3131

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

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (
2727
}
2828
"use strict";
2929

30-
var ReactVersion = "18.3.0-www-modern-01a0c4e12-20230207";
30+
var ReactVersion = "18.3.0-www-modern-758fc7fde-20230207";
3131

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

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -646,4 +646,4 @@ exports.useSyncExternalStore = function (
646646
);
647647
};
648648
exports.useTransition = useTransition;
649-
exports.version = "18.3.0-www-classic-01a0c4e12-20230207";
649+
exports.version = "18.3.0-www-classic-758fc7fde-20230207";

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -638,4 +638,4 @@ exports.useSyncExternalStore = function (
638638
);
639639
};
640640
exports.useTransition = useTransition;
641-
exports.version = "18.3.0-www-modern-01a0c4e12-20230207";
641+
exports.version = "18.3.0-www-modern-758fc7fde-20230207";

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ exports.useSyncExternalStore = function (
657657
);
658658
};
659659
exports.useTransition = useTransition;
660-
exports.version = "18.3.0-www-classic-01a0c4e12-20230207";
660+
exports.version = "18.3.0-www-classic-758fc7fde-20230207";
661661

662662
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
663663
if (

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ exports.useSyncExternalStore = function (
649649
);
650650
};
651651
exports.useTransition = useTransition;
652-
exports.version = "18.3.0-www-modern-01a0c4e12-20230207";
652+
exports.version = "18.3.0-www-modern-758fc7fde-20230207";
653653

654654
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
655655
if (

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
6969
return self;
7070
}
7171

72-
var ReactVersion = "18.3.0-www-classic-01a0c4e12-20230207";
72+
var ReactVersion = "18.3.0-www-classic-758fc7fde-20230207";
7373

7474
var LegacyRoot = 0;
7575
var ConcurrentRoot = 1;

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
6969
return self;
7070
}
7171

72-
var ReactVersion = "18.3.0-www-modern-01a0c4e12-20230207";
72+
var ReactVersion = "18.3.0-www-modern-758fc7fde-20230207";
7373

7474
var LegacyRoot = 0;
7575
var ConcurrentRoot = 1;

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -9845,7 +9845,7 @@ var slice = Array.prototype.slice,
98459845
return null;
98469846
},
98479847
bundleType: 0,
9848-
version: "18.3.0-www-classic-01a0c4e12-20230207",
9848+
version: "18.3.0-www-classic-758fc7fde-20230207",
98499849
rendererPackageName: "react-art"
98509850
};
98519851
var internals$jscomp$inline_1318 = {
@@ -9876,7 +9876,7 @@ var internals$jscomp$inline_1318 = {
98769876
scheduleRoot: null,
98779877
setRefreshHandler: null,
98789878
getCurrentFiber: null,
9879-
reconcilerVersion: "18.3.0-next-01a0c4e12-20230207"
9879+
reconcilerVersion: "18.3.0-next-758fc7fde-20230207"
98809880
};
98819881
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
98829882
var hook$jscomp$inline_1319 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -9510,7 +9510,7 @@ var slice = Array.prototype.slice,
95109510
return null;
95119511
},
95129512
bundleType: 0,
9513-
version: "18.3.0-www-modern-01a0c4e12-20230207",
9513+
version: "18.3.0-www-modern-758fc7fde-20230207",
95149514
rendererPackageName: "react-art"
95159515
};
95169516
var internals$jscomp$inline_1309 = {
@@ -9541,7 +9541,7 @@ var internals$jscomp$inline_1309 = {
95419541
scheduleRoot: null,
95429542
setRefreshHandler: null,
95439543
getCurrentFiber: null,
9544-
reconcilerVersion: "18.3.0-next-01a0c4e12-20230207"
9544+
reconcilerVersion: "18.3.0-next-758fc7fde-20230207"
95459545
};
95469546
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
95479547
var hook$jscomp$inline_1310 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -42695,7 +42695,7 @@ function createFiberRoot(
4269542695
return root;
4269642696
}
4269742697

42698-
var ReactVersion = "18.3.0-www-classic-01a0c4e12-20230207";
42698+
var ReactVersion = "18.3.0-www-classic-758fc7fde-20230207";
4269942699

4270042700
function createPortal(
4270142701
children,

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -42419,7 +42419,7 @@ function createFiberRoot(
4241942419
return root;
4242042420
}
4242142421

42422-
var ReactVersion = "18.3.0-www-modern-01a0c4e12-20230207";
42422+
var ReactVersion = "18.3.0-www-modern-758fc7fde-20230207";
4242342423

4242442424
function createPortal(
4242542425
children,

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -15576,7 +15576,7 @@ Internals.Events = [
1557615576
var devToolsConfig$jscomp$inline_1750 = {
1557715577
findFiberByHostInstance: getClosestInstanceFromNode,
1557815578
bundleType: 0,
15579-
version: "18.3.0-www-classic-01a0c4e12-20230207",
15579+
version: "18.3.0-www-classic-758fc7fde-20230207",
1558015580
rendererPackageName: "react-dom"
1558115581
};
1558215582
var internals$jscomp$inline_2134 = {
@@ -15606,7 +15606,7 @@ var internals$jscomp$inline_2134 = {
1560615606
scheduleRoot: null,
1560715607
setRefreshHandler: null,
1560815608
getCurrentFiber: null,
15609-
reconcilerVersion: "18.3.0-next-01a0c4e12-20230207"
15609+
reconcilerVersion: "18.3.0-next-758fc7fde-20230207"
1561015610
};
1561115611
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1561215612
var hook$jscomp$inline_2135 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -15854,4 +15854,4 @@ exports.unstable_renderSubtreeIntoContainer = function (
1585415854
);
1585515855
};
1585615856
exports.unstable_runWithPriority = runWithPriority;
15857-
exports.version = "18.3.0-next-01a0c4e12-20230207";
15857+
exports.version = "18.3.0-next-758fc7fde-20230207";

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -15136,7 +15136,7 @@ Internals.Events = [
1513615136
var devToolsConfig$jscomp$inline_1718 = {
1513715137
findFiberByHostInstance: getClosestInstanceFromNode,
1513815138
bundleType: 0,
15139-
version: "18.3.0-www-modern-01a0c4e12-20230207",
15139+
version: "18.3.0-www-modern-758fc7fde-20230207",
1514015140
rendererPackageName: "react-dom"
1514115141
};
1514215142
var internals$jscomp$inline_2109 = {
@@ -15167,7 +15167,7 @@ var internals$jscomp$inline_2109 = {
1516715167
scheduleRoot: null,
1516815168
setRefreshHandler: null,
1516915169
getCurrentFiber: null,
15170-
reconcilerVersion: "18.3.0-next-01a0c4e12-20230207"
15170+
reconcilerVersion: "18.3.0-next-758fc7fde-20230207"
1517115171
};
1517215172
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1517315173
var hook$jscomp$inline_2110 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -15355,4 +15355,4 @@ exports.unstable_flushControlled = function (fn) {
1535515355
}
1535615356
};
1535715357
exports.unstable_runWithPriority = runWithPriority;
15358-
exports.version = "18.3.0-next-01a0c4e12-20230207";
15358+
exports.version = "18.3.0-next-758fc7fde-20230207";

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -16346,7 +16346,7 @@ Internals.Events = [
1634616346
var devToolsConfig$jscomp$inline_1824 = {
1634716347
findFiberByHostInstance: getClosestInstanceFromNode,
1634816348
bundleType: 0,
16349-
version: "18.3.0-www-classic-01a0c4e12-20230207",
16349+
version: "18.3.0-www-classic-758fc7fde-20230207",
1635016350
rendererPackageName: "react-dom"
1635116351
};
1635216352
(function (internals) {
@@ -16390,7 +16390,7 @@ var devToolsConfig$jscomp$inline_1824 = {
1639016390
scheduleRoot: null,
1639116391
setRefreshHandler: null,
1639216392
getCurrentFiber: null,
16393-
reconcilerVersion: "18.3.0-next-01a0c4e12-20230207"
16393+
reconcilerVersion: "18.3.0-next-758fc7fde-20230207"
1639416394
});
1639516395
assign(Internals, {
1639616396
ReactBrowserEventEmitter: {
@@ -16625,7 +16625,7 @@ exports.unstable_renderSubtreeIntoContainer = function (
1662516625
);
1662616626
};
1662716627
exports.unstable_runWithPriority = runWithPriority;
16628-
exports.version = "18.3.0-next-01a0c4e12-20230207";
16628+
exports.version = "18.3.0-next-758fc7fde-20230207";
1662916629

1663016630
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
1663116631
if (

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -15896,7 +15896,7 @@ Internals.Events = [
1589615896
var devToolsConfig$jscomp$inline_1792 = {
1589715897
findFiberByHostInstance: getClosestInstanceFromNode,
1589815898
bundleType: 0,
15899-
version: "18.3.0-www-modern-01a0c4e12-20230207",
15899+
version: "18.3.0-www-modern-758fc7fde-20230207",
1590015900
rendererPackageName: "react-dom"
1590115901
};
1590215902
(function (internals) {
@@ -15941,7 +15941,7 @@ var devToolsConfig$jscomp$inline_1792 = {
1594115941
scheduleRoot: null,
1594215942
setRefreshHandler: null,
1594315943
getCurrentFiber: null,
15944-
reconcilerVersion: "18.3.0-next-01a0c4e12-20230207"
15944+
reconcilerVersion: "18.3.0-next-758fc7fde-20230207"
1594515945
});
1594615946
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
1594715947
exports.createPortal = function (children, container) {
@@ -16116,7 +16116,7 @@ exports.unstable_flushControlled = function (fn) {
1611616116
}
1611716117
};
1611816118
exports.unstable_runWithPriority = runWithPriority;
16119-
exports.version = "18.3.0-next-01a0c4e12-20230207";
16119+
exports.version = "18.3.0-next-758fc7fde-20230207";
1612016120

1612116121
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
1612216122
if (

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (__DEV__) {
1919
var React = require("react");
2020
var ReactDOM = require("react-dom");
2121

22-
var ReactVersion = "18.3.0-www-classic-01a0c4e12-20230207";
22+
var ReactVersion = "18.3.0-www-classic-758fc7fde-20230207";
2323

2424
// This refers to a WWW module.
2525
var warningWWW = require("warning");

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (__DEV__) {
1919
var React = require("react");
2020
var ReactDOM = require("react-dom");
2121

22-
var ReactVersion = "18.3.0-www-modern-01a0c4e12-20230207";
22+
var ReactVersion = "18.3.0-www-modern-758fc7fde-20230207";
2323

2424
// This refers to a WWW module.
2525
var warningWWW = require("warning");

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -3634,4 +3634,4 @@ exports.renderToString = function (children, options) {
36343634
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
36353635
);
36363636
};
3637-
exports.version = "18.3.0-www-classic-01a0c4e12-20230207";
3637+
exports.version = "18.3.0-www-classic-758fc7fde-20230207";

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -3548,4 +3548,4 @@ exports.renderToString = function (children, options) {
35483548
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
35493549
);
35503550
};
3551-
exports.version = "18.3.0-www-modern-01a0c4e12-20230207";
3551+
exports.version = "18.3.0-www-modern-758fc7fde-20230207";

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -31212,7 +31212,7 @@ function createFiberRoot(
3121231212
return root;
3121331213
}
3121431214

31215-
var ReactVersion = "18.3.0-www-classic-01a0c4e12-20230207";
31215+
var ReactVersion = "18.3.0-www-classic-758fc7fde-20230207";
3121631216

3121731217
function createPortal(
3121831218
children,

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -38514,7 +38514,7 @@ function createFiberRoot(
3851438514
return root;
3851538515
}
3851638516

38517-
var ReactVersion = "18.3.0-www-modern-01a0c4e12-20230207";
38517+
var ReactVersion = "18.3.0-www-modern-758fc7fde-20230207";
3851838518

3851938519
function createPortal(
3852038520
children,

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -11373,7 +11373,7 @@ Internals.Events = [
1137311373
var devToolsConfig$jscomp$inline_1518 = {
1137411374
findFiberByHostInstance: getClosestInstanceFromNode,
1137511375
bundleType: 0,
11376-
version: "18.3.0-www-classic-01a0c4e12-20230207",
11376+
version: "18.3.0-www-classic-758fc7fde-20230207",
1137711377
rendererPackageName: "react-dom"
1137811378
};
1137911379
var internals$jscomp$inline_2047 = {
@@ -11403,7 +11403,7 @@ var internals$jscomp$inline_2047 = {
1140311403
scheduleRoot: null,
1140411404
setRefreshHandler: null,
1140511405
getCurrentFiber: null,
11406-
reconcilerVersion: "18.3.0-next-01a0c4e12-20230207"
11406+
reconcilerVersion: "18.3.0-next-758fc7fde-20230207"
1140711407
};
1140811408
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1140911409
var hook$jscomp$inline_2048 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -14904,4 +14904,4 @@ exports.unstable_renderSubtreeIntoContainer = function (
1490414904
);
1490514905
};
1490614906
exports.unstable_runWithPriority = runWithPriority;
14907-
exports.version = "18.3.0-next-01a0c4e12-20230207";
14907+
exports.version = "18.3.0-next-758fc7fde-20230207";

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -14007,7 +14007,7 @@ Internals.Events = [
1400714007
var devToolsConfig$jscomp$inline_1673 = {
1400814008
findFiberByHostInstance: getClosestInstanceFromNode,
1400914009
bundleType: 0,
14010-
version: "18.3.0-www-modern-01a0c4e12-20230207",
14010+
version: "18.3.0-www-modern-758fc7fde-20230207",
1401114011
rendererPackageName: "react-dom"
1401214012
};
1401314013
var internals$jscomp$inline_2072 = {
@@ -14038,7 +14038,7 @@ var internals$jscomp$inline_2072 = {
1403814038
scheduleRoot: null,
1403914039
setRefreshHandler: null,
1404014040
getCurrentFiber: null,
14041-
reconcilerVersion: "18.3.0-next-01a0c4e12-20230207"
14041+
reconcilerVersion: "18.3.0-next-758fc7fde-20230207"
1404214042
};
1404314043
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1404414044
var hook$jscomp$inline_2073 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -14369,4 +14369,4 @@ exports.unstable_flushControlled = function (fn) {
1436914369
}
1437014370
};
1437114371
exports.unstable_runWithPriority = runWithPriority;
14372-
exports.version = "18.3.0-next-01a0c4e12-20230207";
14372+
exports.version = "18.3.0-next-758fc7fde-20230207";

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -23911,7 +23911,7 @@ function createFiberRoot(
2391123911
return root;
2391223912
}
2391323913

23914-
var ReactVersion = "18.3.0-www-classic-01a0c4e12-20230207";
23914+
var ReactVersion = "18.3.0-www-classic-758fc7fde-20230207";
2391523915

2391623916
// Might add PROFILE later.
2391723917

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -23911,7 +23911,7 @@ function createFiberRoot(
2391123911
return root;
2391223912
}
2391323913

23914-
var ReactVersion = "18.3.0-www-modern-01a0c4e12-20230207";
23914+
var ReactVersion = "18.3.0-www-modern-758fc7fde-20230207";
2391523915

2391623916
// Might add PROFILE later.
2391723917

0 commit comments

Comments
 (0)