-
Hello, We have several @SharedReader(.somethingContext) var somethingContext We use the @Published var actionVariant: ActionVariant?
init() {
$somethingContext.publisher.combineLatest($rowModels)
.map { [weak self] in self?.actionVariant(for: $0, rowModels: $1) }
.removeDuplicates()
.assign(to: &$actionVariant)
}
var showInfoBasedOnProperty: Bool {
somethingContext.hasProperty
} We use this pattern because we are not ready to use private var emptyExampleView: some View {
VStack(spacing: 16) {
if model. showInfoBasedOnProperty {
Text("Something)
} else {
Text("Something else")
}
}
} If I wrap the view with Other than converting all our models that use the SharedReader to Thank you for your help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @cabeca, we are working on a fix right now, but the simplest thing to do is just add an explicit dependency on swift-perception and pin to 1.6.0. |
Beta Was this translation helpful? Give feedback.
Hi @cabeca, no we won't do that because that will make our packages unnecessarily restrictive. There may be people out there that want to use Sharing 2.6 with Perception 1.x. But you can always add an explicit dependency on Perception that pins to 2.0.1+ if you want.