title: How to change only one object in a large state array of objects using Hooks?
body: <p>I have the following state:</p>
  <pre><code>const [data, setData] = useState([{id:1, marks: 1} , {id:2, marks: 20}, {id:3, marks: 30}, {id:4, marks: 40}])
  </code></pre>
  <p>And I want to write a function which takes in an <code>id</code> and increases the <code>marks</code> of that particular <code>id</code> by 1 using <code>setData</code> (or any other method)</p>