I'm running into an issue where in Combine where I have a boolean @Published property.
When I set it to true, the sink closure is run and I can look at the value being received. It's true. But when I compare it against the actual property that I am observing, they are different.
This bit of code can be simply run in a playground. I'm not sure how this works or why the values would be different
class TestModel {
@Published var isLoading = false
}
let model = TestModel()
model.$isLoading.sink { (isLoading) in
if isLoading != model.isLoading {
print("values NOT same")
}
}
model.isLoading = true