Ramonda

RMD048 — Object in state changed in place

this.user.name = "grace";              // reported: nothing renders
this.user.address.city = "paris";      // reported as `user.address.city`
this.user = { ...this.user, name: "grace" };
this.user = { ...this.user, address: { ...this.user.address, city: "paris" } };

A signal fires when it is assigned a new value, not when the value it holds changes inside. So a write into the object the signal already has changes nothing it can compare, nothing re-renders, and the page goes on showing what it showed before.

The check wraps lazily: a read returns a guarded child only when something asks for that child, so it follows the path a render actually touches. Reading user.name costs two proxies whatever the size of user, and a Date, a Map or a class instance is left alone — their methods need the real receiver.

@ramonda/lens is the shorter way to rebuild a path: this.user = focusOn(this.user).get("address").get("city").set(city).

The array form of the same fault is RMD005.

Next