Input:
<div attr=<div /> />
should become
React.createElement(
"div",
{ attr: React.createElement("div", null) }
);
but Babel currently throws
Property value of JSXAttribute expected node to be of a type ["JSXElement","StringLiteral","JSXExpressionContainer"] but instead got "CallExpression"
I assume because we're going through the intermediate
<div attr=React.createElement("div", null) />
which is indeed invalid. Probably the easiest fix would be to wrap it, e.g.
<div attr={React.createElement("div", null)} />
This means:
I'm interested in taking a crack at this if no one else has started on it yet!
@kedromelon all yours!