Member-only story
How onChange Differs Between React and Vanilla JavaScript
Important differences so you don’t introduce bugs into your app

Many people are using React in their projects. It’s one of the most popular and famous JavaScript frameworks in the world and I think its reputation will last for at least a few more years from now.
But there’s no perfection in the world, regardless of what it is. React is also one of those un-perfect products. Meaning, React is based on JavaScript. So, it supports almost every feature that exists in JavaScript.
However, I found a rather weird thing in React that made me think: “Why is it like this?” This is what I am going to talk about in this post — onChange
, the JavaScript DOM event method.
Before Reading
- You should know React and how to handle the event handlers with JavaScript. If you don’t know them well, please read the relevant documentation first.
- For some people, this could be a topic that is too easy. But, for whoever React, Vue, or other JavaScript frameworks is the first battlefield they have been on with the weapon named JavaScript, such as junior web developers (sometimes seniors too), this might be quite an interesting topic.