Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Commit

Permalink
More performant r-dom
Browse files Browse the repository at this point in the history
  • Loading branch information
mlmorg committed Jan 12, 2015
1 parent 6b5b1eb commit 472233c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ function r(component, properties, children) {

processClasses(properties);

var args = [component, properties];
args = args.concat(children);
// Set the children onto the properties to avoid warnings
// and increase performance
properties.children = children;

return React.createElement.apply(React, args);
return React.createElement(component, properties);
}

// Wraps the className property value with React classSet if it's an object.
Expand Down

0 comments on commit 472233c

Please sign in to comment.