thoughtbot / CombineViewModel

An implementation of the Model-View-ViewModel (MVVM) pattern using Combine.
MIT License
59 stars 4 forks source link

Add ObservableObject.objectDidChange #22

Open sharplet opened 3 years ago

sharplet commented 3 years ago

This would provide a nice dual to objectWillChange and improve discoverability of the functionality. The implementation practically writes itself:

extension ObservableObject {
  public var objectDidChange: ObservableObjectPublisher<Self, DispatchQueue> {
    observe(on: .main)
  }
}