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
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.
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 ?