title: Add value of array elements stored in useState hook React.js
body: <p>I've a use state hook which holds all amount detail:</p>
  <pre><code>const [isamount, setAmount] = useState([{
          Amount0: &quot;4455&quot;,
          Amount1: &quot;66&quot;,
          Amount2: &quot;778&quot;,
          Amount3: &quot;34&quot;,
          Amount4: &quot;234&quot;
      }])
  </code></pre>
  <p>function to store amount values in state array elements</p>
  <pre><code>var checkAmt = (evt) =&gt; {
          // alert(evt.target.name)
              const value = evt.target.value
              setAmount({ ...isamount, [evt.target.name]: value })
      }
  </code></pre>
  <p>How can I calculate total of all the amounts stored in the state?</p>