dillon1000/react
Commit
Browse files Fix `ReactDOMInput` and `ReactDOMTextarea` Race Condition
This fixes a race condition if the `onClick` tries to update the input or textarea (e.g. by calling `setState`):
<input
onClick={function(event) {
this.setState({somethingElse: true}); // Triggers an update.
// event.target.value is now equal to the old value, fail...
this.props.onChange(event);
})
/>Changed paths2 files
First-parent comparisonsrc/dom/components/ReactDOMInput.js ModifiedM src/dom/components/ReactDOMTextarea.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…