On the first render it works, but then the update silently fails. Expected would be the semicolon being removed, or an error/warning in the development build.
Tested on Chrome latest, Firefox latest, with 0.12.1 and master.
Minimal: jsbin
var App = React.createClass({
getInitialState: function(){
return {color: 'red'}
},
handleClick : function() {
console.log('hello world');
this.setState({
color: 'blue'
});
},
render: function() {
console.log('rendering');
var style = {
backgroundColor: this.state.color
};
if (this.props.withsemi) {
style.backgroundColor += ";";
}
return (
<div>
<div style={style} onClick={this.handleClick}></div>
</div>
)
}
});
@rabishah ran into (on IRC).