Created
January 14, 2015 18:43
-
-
Save tadeuzagallo/ee4f46d9900e4ce66e27 to your computer and use it in GitHub Desktop.
React binding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
React.createClass({ | |
update: function() { | |
this.setState({ lastUpdated: Date.now() }); | |
}, | |
render: function () { | |
return <button onClick={ this.update() }>Update!</button> | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
React.createClass({ | |
update: function() { | |
this.setState({ lastUpdated: Date.now() }); | |
}, | |
render: function () { | |
return <button onClick={ this.update }>Update!</button> | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment