Created
December 24, 2014 12:46
-
-
Save 2garryn/3370f2354d2349093687 to your computer and use it in GitHub Desktop.
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
var Calcs = React.createClass({ | |
getInitialState: function() { | |
return {count: ''}; | |
}, | |
handleClickNum: function(index) { | |
console.log("Adsads", index); | |
this.setState({count: index}); | |
}, | |
boundCarry: function(item) { | |
return (this.handleClickNum.bind(this, item)) | |
}, | |
render: function() { | |
return ( | |
<div> | |
<Label count={this.state.count}/> | |
// how to set boundFun as function 'boundCarry' ? | |
<LabeledButtonGrid buttonsLabels={AllButtons} boundFun={this.props.boundCarry} /> | |
</div> | |
)} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment