DEV Community

loading...

Discussion on: How to update object or array state in React

Collapse
raphaelchaula profile image
Raphael Chaula Author • Edited

Good point.
But my point is when you want to update array state, don't act on the array state directly, you need to create another array from the state array and there are multiple solutions for that, I chose destructuring. that's all.