title: React.js - How to change object value inside array of objects
body: <p>i have a problem with array of objects which is inside state. My question is how to change an object value like in example code bellow</p>
  <pre><code>const [theArrayOfObjects, setTheArrayOfObjects] = useState([
      { color: &quot;blue&quot;, shape: &quot;square&quot; }, 
      { color: &quot;red&quot;, shape: &quot;circle&quot; }
      ]);
  </code></pre>
  <p>what i want is</p>
  <pre><code>[
      { color: &quot;blue&quot;, shape: &quot;square&quot; }, 
      { color: &quot;red&quot;, shape: &quot;rectangle&quot; }
  ]
  </code></pre>
  <p>so in short i just want to update array of objects by changing only this specific value</p>