title: React Input type="number" fields don't trigger onChange
body: <p>I have added <code>&lt;input type=&quot;number&quot; value={value} onChange={onChange}&gt;</code> to a form and am checking the format of the input using a simplified onChange function as illustrated in the following component:</p>
  <pre><code>  export function App() {
      const [value, setValue] = useState(&quot;&quot;);
  
      const onChange = (event) =&gt; {
        console.log(&quot;onChange called&quot;, event.target.value);
        setValue(event.target.value);
      };
  
      return &lt;input type=&quot;number&quot; value={value} onChange={onChange} /&gt;;
   }
  </code></pre>
  <p>I would like restrict the value of the input to only be integers using validation in the onChange function.</p>
  <p>However, before I can add the validation, I noticed that when a user enters a valid non-integer number input, such as <code>.</code>, <code>e</code> or <code>E</code>, the value of the input is not passed to the onChange function, and hence I'm not able to perform my validation.</p>
  <p>Below is a codesandbox that can be used to reproduce the issue.</p>
  <p><a href="https://codesandbox.io/s/nice-feynman-nq6bu?fontsize=14&amp;hidenavigation=1&amp;theme=dark" rel="nofollow noreferrer"><img src="https://codesandbox.io/static/img/play-codesandbox.svg" alt=" Example" /></a></p>
  <p>What is the best way to add validation to an input field to ensure that the input is a whole number?</p>