Commit 6ac94426 authored by Ben Alpert's avatar Ben Alpert

React: Use classSet helper instead of recreating

parent 348b849d
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<div id="benchmark"></div> <div id="benchmark"></div>
<script src="bower_components/todomvc-common/base.js"></script> <script src="bower_components/todomvc-common/base.js"></script>
<script src="bower_components/react/react.js"></script> <script src="bower_components/react/react-with-addons.js"></script>
<script src="bower_components/react/JSXTransformer.js"></script> <script src="bower_components/react/JSXTransformer.js"></script>
<script src="bower_components/director/build/director.min.js"></script> <script src="bower_components/director/build/director.min.js"></script>
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
render: function () { render: function () {
return ( return (
<li className={Utils.stringifyObjKeys({ <li className={React.addons.classSet({
completed: this.props.todo.completed, completed: this.props.todo.completed,
editing: this.props.editing editing: this.props.editing
})}> })}>
......
...@@ -43,19 +43,6 @@ ...@@ -43,19 +43,6 @@
} }
} }
return newObj; return newObj;
},
stringifyObjKeys: function (obj) {
var s = '';
var key;
for (key in obj) {
if (obj.hasOwnProperty(key) && obj[key]) {
s += key + ' ';
}
}
return s.trim();
} }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment