Skip to content

Commit

Permalink
Refactor DOM special cases per tags including controlled fields (#26501)
Browse files Browse the repository at this point in the history
I use a shared helper when setting properties into a helper whether it's
initial or update.

I moved the special cases per tag to commit phase so we can check it
only once. This also effectively inlines getHostProps which can be done
in a single check per prop key.

The diffProperties operation is simplified to mostly just generating a
plain diff of all properties, generating an update payload. This might
generate a few more entries that are now ignored in the commit phase.
that previously would've been ignored earlier. We could skip this and
just do the whole diff in the commit phase by always scheduling a commit
phase update.

I tested the attribute table (one change documented below) and a few
select DOM fixtures.

DiffTrain build for [85de6fd](85de6fd)
  • Loading branch information
sebmarkbage committed Mar 29, 2023
1 parent 4b35aaf commit fc1026b
Show file tree
Hide file tree
Showing 15 changed files with 6,251 additions and 6,883 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f62cb39ee58e5918806218de2be8d2833023e7fc
85de6fde515148babd36eae2b7384ad8e62b732a
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (
}
"use strict";

var ReactVersion = "18.3.0-www-modern-0ec8c3f1";
var ReactVersion = "18.3.0-www-modern-3ed4a7e4";

// ATTENTION
// When adding new symbols to this file,
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}

var ReactVersion = "18.3.0-www-classic-31f56934";
var ReactVersion = "18.3.0-www-classic-aa994cf1";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactART-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -9699,7 +9699,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "18.3.0-www-modern-c4381c45",
version: "18.3.0-www-modern-0ad65545",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1304 = {
Expand Down Expand Up @@ -9730,7 +9730,7 @@ var internals$jscomp$inline_1304 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-c4381c45"
reconcilerVersion: "18.3.0-www-modern-0ad65545"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1305 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Loading

0 comments on commit fc1026b

Please sign in to comment.