DEV Community


Discussion on: Updating react nested state properties

ikroeber profile image
Igor Kroeber

Dealing with nested state is not good, but we constantly need it.
I always follow the guidelines and update the whole component state instead of only updating one property. immutability is important because you make sure that your code will never break. If something changes when it shouldn't, it's easier to detect when always updating everything.