Post

Replies

Boosts

Views

Activity

Comment on SwiftUI sheet dismiss warning
Wondering the same thing. I have logic in my ViewModel that subscribes to the state of that @Published variable. If the view were to own it fully as a @State variable, it'd have to propagate that state back to the model on every change, which doesn't even seem possible to do when the sheet is dismissed with a swipe. Even if it was, it's highly undesirable to maintain duplicate state.
Oct ’22