Files
babel/packages/babel-plugin-transform-react-constant-elements/test/fixtures/constant-elements/var/expected.js
Samuel Reed c307bbb3a9 Fix PathHoister hoisting before a same-scope variable declaration.
Seems we didn't have tests running for this very simple case.

Also fixes #5520
2017-05-01 14:32:11 -07:00

8 lines
111 B
JavaScript

function fn(Component) {
var data = "prop",
_ref = <Component prop={data} />;
return () => _ref;
}