I have a button running an action which is async. Once the operation is done, I want to pop to previous screen. In my State class I have a property called isOrderCompleted. In my reducer operation finishes then state gets update -isOrderCompleted- but don't know how to trigger pop in my SwiftUI view.
Interesting, that seems like a pretty good solution!
There's one other possibility, but it uses iOS 14 so won't be viable for awhile. But, just for posterity, you could store a value in your state that determines when you want to dismiss (such as isPresented), and then use the new onChange(of:perform:) API to listen for when it flips to false, and when it does call presentation.dismiss().
Neither or ideal, but they'll work. I think I like your notification method best tbh