Watches a property for changes. This can be a property on the given object or
a property on a nested object if the nested object is also observable.
This function will return a handle that can be used to stop watching the
property.
The callback will be invoked with the new value, old value, and the target
object when the property changes. The target object is the object that
contains the property that changed.
The callback will not be invoked if the value has not changed. This includes
if a parent property changes but the resulting value is the same as the
previous value.
If any property in the path can be undefined, the callback will be invoked
with an undefined newValue and an undefined target when a parent property
changes to undefined.
Watches a property for changes. This can be a property on the given object or a property on a nested object if the nested object is also observable.
This function will return a handle that can be used to stop watching the property.
The callback will be invoked with the new value, old value, and the target object when the property changes. The target object is the object that contains the property that changed.
The callback will not be invoked if the value has not changed. This includes if a parent property changes but the resulting value is the same as the previous value.
If any property in the path can be undefined, the callback will be invoked with an undefined newValue and an undefined target when a parent property changes to undefined.