Skip to content

Commit

Permalink
Combine createElement and JSX modules (#28320)
Browse files Browse the repository at this point in the history
Depends on:

- #28317

---

There's a ton of overlap between the createElement implementation and
the JSX implementation, so I combined them into a single module.

In the actual build output, the shared code between JSX and
createElement will get duplicated anyway, because react/jsx-runtime and
react (where createElement lives) are separate, flat build artifacts.

So this is more about code organization — with a few key exceptions, the
implementations of createElement and jsx are highly coupled.

DiffTrain build for commit 5fb2c93.
  • Loading branch information
acdlite committed Feb 20, 2024
1 parent 163b2f0 commit 2579855
Show file tree
Hide file tree
Showing 9 changed files with 2,289 additions and 2,729 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25686,7 +25686,7 @@ if (__DEV__) {
return root;
}

var ReactVersion = "18.3.0-canary-ec160f32c-20240219";
var ReactVersion = "18.3.0-canary-5fb2c93f3-20240219";

// Might add PROFILE later.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9176,7 +9176,7 @@ var devToolsConfig$jscomp$inline_1014 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-ec160f32c-20240219",
version: "18.3.0-canary-5fb2c93f3-20240219",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1195 = {
Expand Down Expand Up @@ -9207,7 +9207,7 @@ var internals$jscomp$inline_1195 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-ec160f32c-20240219"
reconcilerVersion: "18.3.0-canary-5fb2c93f3-20240219"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1196 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9604,7 +9604,7 @@ var devToolsConfig$jscomp$inline_1056 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-ec160f32c-20240219",
version: "18.3.0-canary-5fb2c93f3-20240219",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1236 = {
Expand Down Expand Up @@ -9635,7 +9635,7 @@ var internals$jscomp$inline_1236 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-ec160f32c-20240219"
reconcilerVersion: "18.3.0-canary-5fb2c93f3-20240219"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1237 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<dcd2c20e1a26861ff0f60d651a2f6e93>>
* @generated SignedSource<<9d1803d74418a7ac44bc89ae8cd0f170>>
*/

"use strict";
Expand Down Expand Up @@ -1025,13 +1025,11 @@ if (__DEV__) {
*/

function isValidElement(object) {
{
return (
typeof object === "object" &&
object !== null &&
object.$$typeof === REACT_ELEMENT_TYPE
);
}
return (
typeof object === "object" &&
object !== null &&
object.$$typeof === REACT_ELEMENT_TYPE
);
}
var ownerHasKeyUseWarning = {};
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<040e6a4059e2c6d1c22e6d708cbf3b39>>
* @generated SignedSource<<8af9696c59d9d4cfa4cc835b5a54e94e>>
*/

"use strict";
Expand Down Expand Up @@ -1061,13 +1061,11 @@ if (__DEV__) {
*/

function isValidElement(object) {
{
return (
typeof object === "object" &&
object !== null &&
object.$$typeof === REACT_ELEMENT_TYPE
);
}
return (
typeof object === "object" &&
object !== null &&
object.$$typeof === REACT_ELEMENT_TYPE
);
}
var ownerHasKeyUseWarning = {};
/**
Expand Down
Loading

0 comments on commit 2579855

Please sign in to comment.