If you need to add the state color as className to "cheese" then you can do it like
<button className={"cheese " + this.state.color}>
Working code
var Hello = React.createClass({
getInitialState: function(){
return {
color: 'blue'
};
},
handleClick: function(){
if (this.state.color === 'blue'){
this.setState({color: 'green'});
} else {
this.setState({color: 'blue'});
}
},
render: function() {
return <button className={"cheese " + this.state.color} onClick={this.handleClick}>My background is: {this.state.color}, Click me to change</button>;
}
});
React.render(<Hello name="World" />, document.getElementById('container'));
JSFIDDLE