Instead, it's hack on top of hack.
The thing though, JSX doesn't return DOM elements. It's a very thin DSL on top of React.createElement calls. Since it's Javascript all the way down, you get a number of benefits:
- you are not constrained by limitations such as "attributes can only be strings" or "children can only be DOM Elements". It's all Javascript expressions
- React knows the return value. It can do efficient diff'ing against its internal DOM representations and only update the actual DOM as needed (same goes for other virtual dom implementations such as snabbdom, virtual-dom etc.)
When all you can pass to an attribute is a string, it's very hard to seriously talk about useful extensible custom components on the web :)
Here's the docs for an element that has some arbitrarily complex properties and function-values properties, that you can set from plain JS or Polymer's template syntax or Angular's, etc... https://www.polymer-project.org/2.0/docs/api/elements/Polyme...
It also takes a template and stamps it out several times based on the complex data, like "higher-order components".
It's very hard to seriously talk about web components with someone so willfully ignorant about them.
DOM APIs are a much bigger problem than just WCs, but are a part of the WC's problem as well
XBL (2001) and its successor XBL2 (2007) was proposed by Mozilla as a companion to their XUL user-interface language
https://blogs.windows.com/msedgedev/2015/07/14/bringing-comp...