You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: To get the element instance, like HTMLButtonElement in the example above, it is a common mistake to use event.target instead of event.currentTarget. The reason why you want to use event.currentTarget is that event.target may be the wrong element due to event propagation.
Happy to send a PR :)
From react/flow docs:
Relevant code:
handleChange = (e) => { const { props } = this; if (props.disabled) { return; } if (!('checked' in props)) { this.setState({ checked: e.target.checked, }); } props.onChange({ + currentTarget: e.currentTarget, target: { ...props, checked: e.target.checked, }, stopPropagation() { e.stopPropagation(); }, preventDefault() { e.preventDefault(); }, nativeEvent: e.nativeEvent, }); };
The text was updated successfully, but these errors were encountered: