-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] automatic trigger for objectWillChange
publisher
#5
Comments
Turns out that is actually simple to to once you know how, since that does not seem to be documented anywhere but in the Swift Evolution Proposal. Credit to SwiftBySundell for finding and writing about that. The tldr of the implementation is that the implementation can provide an alternative built with a I have also changed the associated test case, seems to be working fine. |
solved by #6 |
* Automatic trigger for objectWillChange publisher (implements #5) * yield the value through the `didSet` implementation of the `wrappedValue` to respect the `behavior` property * Dynamically check the objects type to allow the wrapper in non-`ObservableObject` types
Remembering to add a
willSet
to all of your async value properties is not all that user friendly. I think we can do better:Proposed Solution:
The text was updated successfully, but these errors were encountered: