mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
191c16a2274d4b2e3a87b4cee8b8fa6cbfa21f8a
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.
react-fbsource-import
Description
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%