only skip traversal of immutable JSX elements in the optimisation.react.constantElements transformer when we've actually hoisted them - closes #1344

This commit is contained in:
Sebastian McKenzie
2015-04-24 19:28:51 +01:00
parent 6e4e11a365
commit 63344eb0a4
4 changed files with 30 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
var Foo = React.createClass({
render: function() {
return <div className={this.props.className}>
<span />
</div>;
}
});

View File

@@ -0,0 +1,11 @@
"use strict";
var _ref = <span />;
var Foo = React.createClass({
render: function render() {
return <div className={this.props.className}>
{_ref}
</div>;
}
});