Skip to content

Commit c226b42

Browse files
committed
Refactor ReactDOMComponent to use flatter property operations (#26433)
This is in line with the refactor I already did on Fizz earlier and brings Fiber up to a similar structure. We end up with a lot of extra checks due the extra abstractions we use to check the various properties. This uses a flatter and more inline model which makes it easier to see what each property does. The tradeoff is that a change might need changes in more places. The general structure is that there's a switch for tag first, then a switch for each attribute special case, then a switch for the value. So it's easy to follow where each scenario will end up and there shouldn't be any unnecessary code executed along the way. My goal is to eventually get rid of the meta-programming in DOMProperty and CSSProperty but I'm leaving that in for now - in line with Fizz. My next step is moving around things a bit in the diff/commit phases. This is the first step to more refactors for perf and size, but also because I'm adding more special cases so I need to have a flatter structure that I can reason about for those special cases. DiffTrain build for [520f7f3](520f7f3)
1 parent c596d33 commit c226b42

25 files changed

+9510
-7577
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0131d0cff40d4054ac72c857d3a13c5173c46e0a
1+
520f7f3ed4d01e9e50a73d7d04ff138e3c71ac86

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

Lines changed: 1 addition & 1 deletion
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-1ad200fa";
30+
var ReactVersion = "18.3.0-www-modern-04bef010";
3131

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

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

Lines changed: 1 addition & 1 deletion
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-ca4ffb9c";
72+
var ReactVersion = "18.3.0-www-classic-5ff0222e";
7373

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

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9610,7 +9610,7 @@ var slice = Array.prototype.slice,
96109610
return null;
96119611
},
96129612
bundleType: 0,
9613-
version: "18.3.0-www-modern-52358352",
9613+
version: "18.3.0-www-modern-4e328d6f",
96149614
rendererPackageName: "react-art"
96159615
};
96169616
var internals$jscomp$inline_1313 = {
@@ -9641,7 +9641,7 @@ var internals$jscomp$inline_1313 = {
96419641
scheduleRoot: null,
96429642
setRefreshHandler: null,
96439643
getCurrentFiber: null,
9644-
reconcilerVersion: "18.3.0-www-modern-52358352"
9644+
reconcilerVersion: "18.3.0-www-modern-4e328d6f"
96459645
};
96469646
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
96479647
var hook$jscomp$inline_1314 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

0 commit comments

Comments
 (0)