Open reuvenlevitsky opened 5 years ago
Yes, as of now, it doesn't support the notion of null(nil) as a valid value. There needs to be an explicit way of un-setting the value and notify observers. which would also put the onus on observers to be vary of fact that the value recieved can be nil. I still need to figure out if this should be part of the default behavior and if yes, should it be a strong abstraction (Optional value?)
Hey, right now this library has Observable which might support on theory observing optional types. The problem is that when the value is being set, you have this check:
That doesn't allow the observing instance to react to the "cleanup" of this model. For example if
ObservedType = UIImage
, and I want to clean up the image from the UIImageView:This code will not be invoked for a nil value.
Do you have any plans to support setting nil value to Observable?