Feb 27, 2021
Yes and No. I am not sure I understand your question. “patients” is an array, the fact that it is published within an observableObject means updates to it will tigger a view update in SwiftUI. The Just command here is accessing the array and effectively flattening it out, publishing each item within one at a time. I wrote another article just about flatMap here.
https://betterprogramming.pub/working-with-the-flatmap-combine-operator-in-ios-1267b6cf37ca