fix bind warning in todoApp example

This commit is contained in:
timotius02
2015-08-21 22:49:15 -04:00
parent ce7e9f526b
commit 6b83201546
2 changed files with 2 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ var TodoList2 = React.createClass({
return (
<li key={ index }>
{ item.text }
<span onClick={ _this.props.removeItem.bind(_this, item['.key']) }
<span onClick={ _this.props.removeItem.bind(null, item['.key']) }
style={{ color: 'red', marginLeft: '10px', cursor: 'pointer' }}>
X
</span>

View File

@@ -6,7 +6,7 @@ var TodoList3 = React.createClass({
return (
<li key={ index }>
{ item.text }
<span onClick={ _this.props.removeItem.bind(_this, item['.key']) }
<span onClick={ _this.props.removeItem.bind(null, item['.key']) }
style={{ color: 'red', marginLeft: '10px', cursor: 'pointer' }}>
X
</span>