Here's what the official docs say about onChange:-
The 'onChange' event behaves as you would expect it to: whenever a form field is changed, this event is fired. We intentionally do not use the existing browser behaviour because 'onChange' is a misnomer for its behaviour and React relies on this event to handle user input in real time.
https://facebook.github.io/react/docs/dom-elements.html#onchange
But there is already an event which fires on every keystroke, i.e. 'onInput'. So I don't understand why react changed the behaviour of 'onChange' to behave as 'onInput'. Also in the docs, everywhere 'onChange' is used. Is there any specific reason for it ? Are the two completely interchangeable in react
? Now there is no event with the behaviour of actual 'onchange' . Does react intend to correct this in future ?
Here's the code for that :-
https://jsfiddle.net/nikhilgoyal104ah4/69z2wepo/77518/