mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
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.