Either due to lower parsing costs or better type inference, this seems to perform better than direct object inlining. (All along, the main win was skipping a loop through props, not avoiding a function call.)
7 lines
178 B
JavaScript
7 lines
178 B
JavaScript
var TestComponent = React.createClass({
|
|
render: function () {
|
|
return babelHelpers.createRawReactElement("span", null, {
|
|
className: this.props.someProp
|
|
});
|
|
}
|
|
}); |