CombineSwiftPlayground icon indicating copy to clipboard operation
CombineSwiftPlayground copied to clipboard

@Published Properties build failure

Open LoadingIndicator opened this issue 6 years ago • 2 comments

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.

LoadingIndicator avatar Sep 14 '19 18:09 LoadingIndicator

This should be fixed now!

AvdLee avatar Mar 10 '20 19:03 AvdLee

Thank you!

LoadingIndicator avatar Mar 14 '20 16:03 LoadingIndicator