CombineSwiftPlayground
CombineSwiftPlayground copied to clipboard
@Published Properties build failure
Hey Antoine, thanks for the playground. I cannot build the @Published Properties part of the playground since you're using the @Published property wrapper within a struct.
As the documentation states:
The @Published attribute is class-constrained. Use it with properties of classes, not with non-class types like structures.
I also think for the two print statements to make sense at the bottom of said playground, you should set the button's isEnabled value to false initially. Otherwise, like it is the case now, "Button enabled is true" is being printed twice.
This should be fixed now!
Thank you!