Nicolò Ribaudo 9f4e2f81d8
[class-properties] Remove unnecessary return and temp variable (#8123)
* Remove unnecessary temp variable

* Update tests
2018-06-08 07:02:36 +02:00

29 lines
498 B
JavaScript

import React from 'react'; // Regression test for https://github.com/babel/babel/issues/5552
var _ref =
/*#__PURE__*/
<div />;
class BugReport extends React.Component {
constructor(...args) {
super(...args);
this.thisWontWork = ({
color
}) => data => {
return <div color={color}>does not reference data</div>;
};
this.thisWorks = ({
color
}) => data => {
return <div color={color}>{data}</div>;
};
}
render() {
return _ref;
}
}