I have the following code for reactjs:
class Counter extends React.Component {
constructor(props) {
super(props);
this.state = { count: 0};
}
incrementCount() {
this.setState( {count: this.state.count + 1});
}
render() {
return (
<div> Count:{this.state.count}
<button type="button" style={btnCSS}
**onClick={ this.incrementCount.bind(this) }>React</button>**
</div>
);
}
};
in the statement onClick={ this.incrementCount.bind(this) }>React does the first 'this' refer to the button and the second 'this' refer to the onClick event?