mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
1e2dbf7fdbbaca335297568f17be984709ab2b28
Fixes `<fbt>`. This required a bunk of yak shaving to work through several issues: * First, there was a bug in codegen for JsxNamedspacedName. I added handling for it for identifiers, but JsxNamespacedName gets converted to a Primitive. The output looked correct because Babel happily creates invalid Jsx identifiers! * Next, I needed to add locations to JSX nodes. It took me a while to pinpoint which specific node needed the location, so I ended up just adding locations to all the parts of a Jsx element. * That uncovered the fact that FBT was expecting the `<fbt:param>`'s `name` attribute value to be a StringLiteral, not a StringLiteral wrapped in a JsxExpressionContainer. So now we special-case JsxAttribute and emit raw StringLiteral (either is allowed per the spec) And with that, voila, `<fbt>` works.
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%