ProviderObserver listens to the changes of a ProviderContainer.
To use it, extend the class ProviderObserver and override the method you like to use.
ProviderObserver has four methods :
didAddProvideris called every time a provider was initialized, and the value exposed is value.
didDisposeProvideris called every time A provider was disposed
didUpdateProvideris called every time my providers when they emit a notification.
mayHaveChangedis called when the dependency of a provider changed, but it is not yet sure if the computed value changes.
It is possible that mayHaveChanged will be called, without didUpdateProvider being called, such as when a Provider is re-computed but returns a value == to the previous one.
A simple use case for ProviderObserver, is to log the changes in providers by overriding the method
Now that every time the value of our provider is updated, the logger will log it :