DEV Community

Discussion on: How to update nested state in react component without using redux

Collapse
 
swagwik profile image
Sattwik Sahu

That's the exact reason why we use immer with Redux / other state management libraries. The process of updating the nested state involves so many ...s and nested arrays, objects which are not required after using immer.

Maybe you could include it in the post, showing a solution to this problem of unnecessarily long code.

Collapse
 
abu profile image
Abu Jaid

Thanks @sattwik sahu