title: how to automatically add commas to numbers being typed
body: <p>I have a calculator. How do I add commas to an input, so when I type 40000 it would automatically display 40,000? (The number should still stay as 40000  in order to do the right calculation.)</p>
  
  <p>This is how I get the value of the inputs:</p>
  
  <pre><code> handleStateChange = (e) =&gt; {
          const { target: { name, value } } = e
          this.setState({ [name]: value })
          }
  </code></pre>