Nicolò Ribaudo f3912ac08f
Mark transpiled JSX elements as pure (#11126)
* Mark transpiled JSX elements as pure

* Avoid duble annotation

* Add "pure" option to the React preset

* Fix generator indentation

* Update tests

* Add tests for the "pure" option

* Update windows fixtures
2020-03-19 15:43:54 +01:00

26 lines
445 B
JavaScript

import { jsx as _jsx2 } from "react/jsx-runtime";
const Bar = () => {
const Foo = () => {
const Component = ({
thing,
..._react
}) => {
if (!thing) {
var _react2 = "something useless";
var b = _react3();
var c = _react5();
var jsx = 1;
var _jsx = 2;
return /*#__PURE__*/_jsx2("div", {});
}
;
return /*#__PURE__*/_jsx2("span", {});
};
};
};