Closed
Description
Check the following example:
var Example = React.createClass({
getInitialState: function() {
return {value: 'Try to type or backspace!'};
},
handleChange: function(event) {
this.setState({value: event.target.value});
},
render: function() {
return (
<div>
<div>{this.state.value}</div>
<input type="text" value="fixed" onChange={this.handleChange} />
</div>
);
}
});
The first div's content will either read "fixe" (on backspace) or "fixed{lastKeyPressed}".
Intuitively, it should always read "fixed".
Metadata
Metadata
Assignees
Labels
No labels