Hello. I have a question regarding Signals.
Let's say that we have a signal that takes an object as a value.
state = signal({name: 'T', age: 30})
and an effect that logs something for when the name changed.
effect(() => console.log(name changed ${state().name}))
if I were to update the state age, by using update:
this.state.update((s) => ({ ...s, age: 40 }))
The effect would also trigger, logging the fact that the name changed.
In truth, the object changed, so that makes sense.
But my question is, is there a way to achieve fine-grained reactivity so that this scenario does not happen?
I am looking forward for an answer. Thank you very much!