I have:
...
setActive(section) {
this.setState({
currentSection: section
});
console.log('Current view is'+this.state.currentSection);
}
render() {
return <div>
<div className="section">
<HeaderButton active text="test1" count={23} backgoundColor={'#c04c36'} onClick={() => this.setActive.bind('test1')}/>
</div>
<div className="section">
<HeaderButton text="test2" count={45} backgoundColor={'#ffe698'} onClick={() => this.setActive.bind('test2')}/>
</div>
<div className="section">
<HeaderButton text="test3" count={4} backgoundColor={'#198a75'} onClick={() => this.setActive.bind('test3')}/>
</div>
</div>
}
But when I click on those component nothing at all happens. What am I doing wrong?