How can I update state.item[1] in state using setState?
Here’s how you can do it without helper libs: handleChange: function (e) { // 1. Make a shallow copy of the items let items = […this.state.items]; // 2. Make a shallow copy of the item you want to mutate let item = {…items[1]}; // 3. Replace the property you’re intested in item.name=”newName”; // 4. Put … Read more