Browse Source

Remove React.autoBind from examples

main
Paul O’Shannessy 12 years ago
parent
commit
459daa63da
  1. 4
      _js/examples/markdown.js
  2. 4
      _js/examples/timer.js

4
_js/examples/markdown.js

@ -11,9 +11,9 @@ var MarkdownEditor = React.createClass({\n\
getInitialState: function() {\n\
return {value: 'Type some *markdown* here!'};\n\
},\n\
handleInput: React.autoBind(function() {\n\
handleInput: function() {\n\
this.setState({value: this.refs.textarea.getDOMNode().value});\n\
}),\n\
},\n\
render: function() {\n\
return (\n\
<div className=\"MarkdownEditor\">\n\

4
_js/examples/timer.js

@ -7,9 +7,9 @@ var Timer = React.createClass({\n\
getInitialState: function() {\n\
return {secondsElapsed: 0};\n\
},\n\
tick: React.autoBind(function() {\n\
tick: function() {\n\
this.setState({secondsElapsed: this.state.secondsElapsed + 1});\n\
}),\n\
},\n\
componentDidMount: function() {\n\
setInterval(this.tick, 1000);\n\
},\n\

Loading…
Cancel
Save