Skip to content

Commit fcad637

Browse files
committed
jsx(): Treat __self and __source as normal props (#28257)
These used to be reserved props because the classic React.createElement runtime passed this data as props, whereas the jsxDEV() runtime passes them as separate arguments. This brings us incrementally closer to being able to pass the props object directly through to React instead of cloning a subset into a new object. The React.createElement runtime is unaffected. DiffTrain build for commit 91caa96.
1 parent 1cff685 commit fcad637

File tree

11 files changed

+36
-40
lines changed

11 files changed

+36
-40
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
@@ -25725,7 +25725,7 @@ if (__DEV__) {
2572525725
return root;
2572625726
}
2572725727

25728-
var ReactVersion = "18.3.0-canary-f07ac1e26-20240206";
25728+
var ReactVersion = "18.3.0-canary-91caa96e4-20240206";
2572925729

2573025730
// Might add PROFILE later.
2573125731

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
@@ -9157,7 +9157,7 @@ var devToolsConfig$jscomp$inline_1012 = {
91579157
throw Error("TestRenderer does not support findFiberByHostInstance()");
91589158
},
91599159
bundleType: 0,
9160-
version: "18.3.0-canary-f07ac1e26-20240206",
9160+
version: "18.3.0-canary-91caa96e4-20240206",
91619161
rendererPackageName: "react-test-renderer"
91629162
};
91639163
var internals$jscomp$inline_1190 = {
@@ -9188,7 +9188,7 @@ var internals$jscomp$inline_1190 = {
91889188
scheduleRoot: null,
91899189
setRefreshHandler: null,
91909190
getCurrentFiber: null,
9191-
reconcilerVersion: "18.3.0-canary-f07ac1e26-20240206"
9191+
reconcilerVersion: "18.3.0-canary-91caa96e4-20240206"
91929192
};
91939193
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
91949194
var hook$jscomp$inline_1191 = __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
@@ -9585,7 +9585,7 @@ var devToolsConfig$jscomp$inline_1054 = {
95859585
throw Error("TestRenderer does not support findFiberByHostInstance()");
95869586
},
95879587
bundleType: 0,
9588-
version: "18.3.0-canary-f07ac1e26-20240206",
9588+
version: "18.3.0-canary-91caa96e4-20240206",
95899589
rendererPackageName: "react-test-renderer"
95909590
};
95919591
var internals$jscomp$inline_1231 = {
@@ -9616,7 +9616,7 @@ var internals$jscomp$inline_1231 = {
96169616
scheduleRoot: null,
96179617
setRefreshHandler: null,
96189618
getCurrentFiber: null,
9619-
reconcilerVersion: "18.3.0-canary-f07ac1e26-20240206"
9619+
reconcilerVersion: "18.3.0-canary-91caa96e4-20240206"
96209620
};
96219621
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
96229622
var hook$jscomp$inline_1232 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<b24db7b649efc008c0c89e90dba4877a>>
10+
* @generated SignedSource<<f1fec494d1bdfb72e5edd3dbbb0e62a3>>
1111
*/
1212

1313
"use strict";
@@ -794,10 +794,8 @@ if (__DEV__) {
794794
for (propName in config) {
795795
if (
796796
hasOwnProperty.call(config, propName) && // Skip over reserved prop names
797-
propName !== "key" && // TODO: These will no longer be reserved in the next major
798-
propName !== "ref" &&
799-
propName !== "__self" &&
800-
propName !== "__source"
797+
propName !== "key" && // TODO: `ref` will no longer be reserved in the next major
798+
propName !== "ref"
801799
) {
802800
props[propName] = config[propName];
803801
}

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<4e6cfb0b86828f5be0c6c8e34f4fdb7a>>
10+
* @generated SignedSource<<af1d2eacbefd00d9c1bfd4c752fee8c4>>
1111
*/
1212

1313
"use strict";
@@ -794,10 +794,8 @@ if (__DEV__) {
794794
for (propName in config) {
795795
if (
796796
hasOwnProperty.call(config, propName) && // Skip over reserved prop names
797-
propName !== "key" && // TODO: These will no longer be reserved in the next major
798-
propName !== "ref" &&
799-
propName !== "__self" &&
800-
propName !== "__source"
797+
propName !== "key" && // TODO: `ref` will no longer be reserved in the next major
798+
propName !== "ref"
801799
) {
802800
props[propName] = config[propName];
803801
}

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<d95535f2595d28064d67106ad7fa3c58>>
10+
* @generated SignedSource<<9119a43311c6e3bbc52baa1c4dfff7c0>>
1111
*/
1212

1313
"use strict";
@@ -29,8 +29,6 @@ function jsx$1(type, config, maybeKey) {
2929
hasOwnProperty.call(config, propName) &&
3030
"key" !== propName &&
3131
"ref" !== propName &&
32-
"__self" !== propName &&
33-
"__source" !== propName &&
3432
(props[propName] = config[propName]);
3533
if (type && type.defaultProps)
3634
for (propName in ((config = type.defaultProps), config))

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<d95535f2595d28064d67106ad7fa3c58>>
10+
* @generated SignedSource<<9119a43311c6e3bbc52baa1c4dfff7c0>>
1111
*/
1212

1313
"use strict";
@@ -29,8 +29,6 @@ function jsx$1(type, config, maybeKey) {
2929
hasOwnProperty.call(config, propName) &&
3030
"key" !== propName &&
3131
"ref" !== propName &&
32-
"__self" !== propName &&
33-
"__source" !== propName &&
3432
(props[propName] = config[propName]);
3533
if (type && type.defaultProps)
3634
for (propName in ((config = type.defaultProps), config))

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

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<593daac7ac70a57cfd731bbfdac659fc>>
10+
* @generated SignedSource<<41ebcac0959dc7c1f568b21dae3e2874>>
1111
*/
1212

1313
"use strict";
@@ -24,7 +24,7 @@ if (__DEV__) {
2424
) {
2525
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
2626
}
27-
var ReactVersion = "18.3.0-canary-f07ac1e26-20240206";
27+
var ReactVersion = "18.3.0-canary-91caa96e4-20240206";
2828

2929
// ATTENTION
3030
// When adding new symbols to this file,
@@ -903,8 +903,13 @@ if (__DEV__) {
903903
for (propName in config) {
904904
if (
905905
hasOwnProperty.call(config, propName) && // Skip over reserved prop names
906-
propName !== "key" && // TODO: These will no longer be reserved in the next major
907-
propName !== "ref" &&
906+
propName !== "key" && // TODO: `ref` will no longer be reserved in the next major
907+
propName !== "ref" && // ...and maybe these, too, though we currently rely on them for
908+
// warnings and debug information in dev. Need to decide if we're OK
909+
// with dropping them. In the jsx() runtime it's not an issue because
910+
// the data gets passed as separate arguments instead of props, but
911+
// it would be nice to stop relying on them entirely so we can drop
912+
// them from the internal Fiber field.
908913
propName !== "__self" &&
909914
propName !== "__source"
910915
) {
@@ -1036,8 +1041,13 @@ if (__DEV__) {
10361041
for (propName in config) {
10371042
if (
10381043
hasOwnProperty.call(config, propName) && // Skip over reserved prop names
1039-
propName !== "key" && // TODO: These will no longer be reserved in the next major
1040-
propName !== "ref" &&
1044+
propName !== "key" && // TODO: `ref` will no longer be reserved in the next major
1045+
propName !== "ref" && // ...and maybe these, too, though we currently rely on them for
1046+
// warnings and debug information in dev. Need to decide if we're OK
1047+
// with dropping them. In the jsx() runtime it's not an issue because
1048+
// the data gets passed as separate arguments instead of props, but
1049+
// it would be nice to stop relying on them entirely so we can drop
1050+
// them from the internal Fiber field.
10411051
propName !== "__self" &&
10421052
propName !== "__source"
10431053
) {
@@ -1583,10 +1593,8 @@ if (__DEV__) {
15831593
for (propName in config) {
15841594
if (
15851595
hasOwnProperty.call(config, propName) && // Skip over reserved prop names
1586-
propName !== "key" && // TODO: These will no longer be reserved in the next major
1587-
propName !== "ref" &&
1588-
propName !== "__self" &&
1589-
propName !== "__source"
1596+
propName !== "key" && // TODO: `ref` will no longer be reserved in the next major
1597+
propName !== "ref"
15901598
) {
15911599
props[propName] = config[propName];
15921600
}

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

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

1313
"use strict";
@@ -157,8 +157,6 @@ function jsx$1(type, config, maybeKey) {
157157
hasOwnProperty.call(config, propName) &&
158158
"key" !== propName &&
159159
"ref" !== propName &&
160-
"__self" !== propName &&
161-
"__source" !== propName &&
162160
(props[propName] = config[propName]);
163161
if (type && type.defaultProps)
164162
for (propName in ((config = type.defaultProps), config))
@@ -550,4 +548,4 @@ exports.useSyncExternalStore = function (
550548
exports.useTransition = function () {
551549
return ReactCurrentDispatcher.current.useTransition();
552550
};
553-
exports.version = "18.3.0-canary-f07ac1e26-20240206";
551+
exports.version = "18.3.0-canary-91caa96e4-20240206";

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

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

1313
"use strict";
@@ -125,8 +125,6 @@ function jsx$1(type, config, maybeKey) {
125125
hasOwnProperty.call(config, propName) &&
126126
"key" !== propName &&
127127
"ref" !== propName &&
128-
"__self" !== propName &&
129-
"__source" !== propName &&
130128
(props[propName] = config[propName]);
131129
if (type && type.defaultProps)
132130
for (propName in ((config = type.defaultProps), config))
@@ -546,7 +544,7 @@ exports.useSyncExternalStore = function (
546544
exports.useTransition = function () {
547545
return ReactCurrentDispatcher.current.useTransition();
548546
};
549-
exports.version = "18.3.0-canary-f07ac1e26-20240206";
547+
exports.version = "18.3.0-canary-91caa96e4-20240206";
550548
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
551549
"function" ===
552550
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f07ac1e2680a26c5b3bf9c651d62c792de71d46d
1+
91caa96e4261704d42333f5e02ba32d870379fc4

0 commit comments

Comments
 (0)