[Fizz] Fix children rendering in custom elements with enableCustomElementPropertySupport (#27511)

The `enableCustomElementPropertySupport` flag changes React's handling
of custom elements in a way that is more useful that just treating every
prop as an attribute. However when server rendering we have no choice
but to serialize props as attributes. When this flag is on and React
supports more prop types on the client like functions and objects the
server implementation needs to be a bit more naunced in how it renders
these components. With this flag on `false`, function, and object props
are omitted entirely and `true` is normalized to `""`. There was a bug
however in the implementation which caused children more complex than a
single string to be omitted because it matched the object type filter.
This change reorganizes the code a bit to put these filters in the
default prop handline case, leaving children, style, and innerHTML to be
handled via normal logic.

fixes: https://github.com/facebook/react/issues/27286

DiffTrain build for commit https://github.com/facebook/react/commit/bb778528d1ca22b44dad832f0258aaa4c0e6d4a4.
This commit is contained in:
gnoff
2023-10-12 22:07:13 +00:00
parent d1f977094f
commit 191c16a227
7 changed files with 9 additions and 9 deletions
@@ -24770,7 +24770,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-canary-ea8a8619c-20231012";
var ReactVersion = "18.3.0-canary-bb778528d-20231012";
// Might add PROFILE later.
@@ -8968,7 +8968,7 @@ var devToolsConfig$jscomp$inline_1008 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-ea8a8619c-20231012",
version: "18.3.0-canary-bb778528d-20231012",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1201 = {
@@ -8999,7 +8999,7 @@ var internals$jscomp$inline_1201 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-ea8a8619c-20231012"
reconcilerVersion: "18.3.0-canary-bb778528d-20231012"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1202 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -9394,7 +9394,7 @@ var devToolsConfig$jscomp$inline_1050 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-ea8a8619c-20231012",
version: "18.3.0-canary-bb778528d-20231012",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1242 = {
@@ -9425,7 +9425,7 @@ var internals$jscomp$inline_1242 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-ea8a8619c-20231012"
reconcilerVersion: "18.3.0-canary-bb778528d-20231012"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1243 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -27,7 +27,7 @@ if (
}
"use strict";
var ReactVersion = "18.3.0-canary-ea8a8619c-20231012";
var ReactVersion = "18.3.0-canary-bb778528d-20231012";
// ATTENTION
// When adding new symbols to this file,
@@ -580,4 +580,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-ea8a8619c-20231012";
exports.version = "18.3.0-canary-bb778528d-20231012";
@@ -583,7 +583,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-ea8a8619c-20231012";
exports.version = "18.3.0-canary-bb778528d-20231012";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
@@ -1 +1 @@
ea8a8619ce51a0f8f0a78f87485e4e2a6f9d8c27
bb778528d1ca22b44dad832f0258aaa4c0e6d4a4