The Observer Locator API allows you to watch properties in your components for changes without the need for using the @observable decorator. In most cases, manual observation will not be required using this API, but it is there if you want it.
By default, an observer locator is used to create observers and subscribe to them for change notification.
An observer of an object property can be retrieved using an observer locator.
An example of this is:
// getting the observer for property 'value'constobserver=observerLocator.getObserver(obj,'value')
And to subscribe to changes emitted by this observer:
constsubscriber={handleChange(newValue){console.log('new value of object is:',newValue)}}observer.subscribe(subscriber)// and to stop subscribingobserver.unsubscribe(subscriber)