Skip to content

Instantly share code, notes, and snippets.

@2garryn
Created December 24, 2014 12:46
Show Gist options
  • Save 2garryn/3370f2354d2349093687 to your computer and use it in GitHub Desktop.
Save 2garryn/3370f2354d2349093687 to your computer and use it in GitHub Desktop.
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